Welcome Guest Search | Active Topics | Sign In | Register

fire grid callback from javascript Options
Brad Coble
Posted: Tuesday, June 16, 2009 8:06:08 AM
Rank: Advanced Member
Groups: Member

Joined: 2/4/2009
Posts: 31
Hi!

Loving the updated controls, thanks!

I have a grid using callback mode. According to the documentation, when in callback mode, it retrieves only the data. not the whole control again. I want to use javascript to fire that callback for a partial page post of the grid retreiving only data. How?

The reason I need this is because some times the grid has zero items and the raiseitemcommand fails because, of course, it requires at least 1 item in the collection.

I currently have a work around, which is to wrap the grid in a callbackpanel. WHen I need to update the grid I check the item count and either call raiseitemcommand or execute the callbackpanel. The work around though is kinda kludgy and redundant.

Thanks!!

Brad
eo_support
Posted: Tuesday, June 16, 2009 9:34:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Glad that you like the new controls. As to the Grid, I can not think of anything better. The easiest solution is probably to modify raisesItemCommandEvent to allow invalid item index (for example, -1). That way you will still be able to trigger a callback regardless. Please let us know if this will work for you.

Thanks!
Brad Coble
Posted: Tuesday, June 16, 2009 10:46:30 AM
Rank: Advanced Member
Groups: Member

Joined: 2/4/2009
Posts: 31
Do you mean for me to modify raiseItemCommandEvent ? If so, I could explore that option. I have dug into the generated javascript before but I worry about you guys making changes. If you mean you guys are going to add that, sure absolutely, go for it!

Thanks!!

Brad
eo_support
Posted: Tuesday, June 16, 2009 10:53:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I mean we will modify the code. :)

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.