I have radgrid control in my page. I want hide the some rows in grid depending on the data in it. And I want to show these rows when clicking on the button which is inside the grid. I have attached the sample screenshot here.
It's a little difficult to understand your requirement from your description. It's possible to hide the row based on some conditional check of a column's data value, but once hidden, the button for that row would not be available.
I just want to add that in order to display back the items you need to attach a client-side event handler to the button's click event. Using dom operations (preferrably jQuery) you should get the parent row where the buttons is located. The parent row has an id which consists of two parts: the id of the grid's table view client-side component which the row belongs to + "__" + the index of the row. So you should split the ID, get the first part and use the $find(...) directive to get hold of the table view. Now that you have the table view object, hide/show the item using the following API: http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-hideitem.html http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-showitem.html
Hope it helps.
All the best,
Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>