how to give unique id to the buttonssss…is there any way in cgridview
how to give unique id to the buttonssss…is there any way in cgridview
Can you explain your need as this is not a good practice… why would you give different IDs to every button?
for each element in CButtomCOlumn you have htmloptions… checkout class reference for more info
but what if you have to concatinate the row id in the buttonid
you can use the URL instead … for example… for the view button there is the property viewButtonUrl - http://www.yiiframew…uttonUrl-detail
Here you can use $data to get the row id.
thanks mdomba…but this would increase the unnecessary effort…if there is not any way out i’ll go for it as i already did it but not tested properly
In button class you cannot get the current row ID because it does not evaluate an expression like it is done for the url… you could extend CButtonColumn and add that functionality… but IMO it is simpler to use the url…
ok thanks mdomba for replying the questionssssssssss…I’ll give it a try