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

Grid's selected Item returns null in server-side ItemCommand when client side onCommand for Disabling AJAX

3 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sunny
Top achievements
Rank 1
Sunny asked on 19 May 2010, 01:00 PM
hello,

I need to disable AJAX on RadGrid's one command for file download purpose and so I, first, made use of client settings and there used onCommand client side where I make AJAX disabled which works fine at its part
So the flow goes first at client side and first enables/disables AJAX and then goes server side on ItemCommand event where I can not access e.Item's values and even data key value

Please refer to my code snippet for server side event-ItemCommand:

GridEditableItem editedItem = e.Item as GridEditableItem; 
Hashtable newValues = new Hashtable(); 
editedItem.ExtractValues(newValues); 

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 24 May 2010, 01:01 PM
Hi Sunny,

One possible option in this case would be to not use the onCommand client side handler, but rather use the onrequest start client side event for the ajax control

http://www.telerik.com/help/aspnet-ajax/ajxonrequeststart.html

Give this suggestion a try and let me know how it goes.

Greetings,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Sunny
Top achievements
Rank 1
answered on 11 Jun 2010, 04:21 PM
hi Yavor,

Sorry I was out of town for 2-3 weeks....
Could you please give me a proper example of ragdrid having Item Command and onStartRequest integrated?

Thanks,
Sunny
0
Yavor
Telerik team
answered on 16 Jun 2010, 10:23 AM
Hello Sunny,

Hitting "Update" for example will first raise the onStartRequest, and then the proper server side event, where you can extract the required values. Can you please let me know how this meets your requirements, or if/how it falls short.

All the best,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Sunny
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Sunny
Top achievements
Rank 1
Share this question
or