This is a migrated thread and some comments may be shown as answers.

Full postback triggered on clicking command item buttons

1 Answer 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adesh
Top achievements
Rank 1
Adesh asked on 13 Aug 2013, 05:26 PM
Hi,

I have an issue related to the post back triggered by the command items of radgrid.

Scenario is I have a web page that contains two rad grids they both have their command item template inside the rad-toolbar.

both grids have Add, update, delete on their command item templates whose visibility are decided by the no of record chosen from the respective grid.


Problem - 
When I click say one command item from radgrid1 than it forces the complete page post-back and due to this the command item visibility 
on radgrid 2 gets reset .
So is there any way that both grids should not disturb the each other say command items visibility.

Please help


thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 16 Aug 2013, 11:16 AM
Hi Adesh,

You can modify the visibility of the command item controls in the PreRender event by getting a reference to the command item using the approach demonstrated in the following topic:
http://www.telerik.com/help/aspnet-ajax/grid-using-getitems-getcolumn-methods.html

That way, their state will be preserved on every postback to the server.

Alternatively, you can ajaxify your grids separately so they do not update each other:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
General Discussions
Asked by
Adesh
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or