|
Rank: Newbie Groups: Member
Joined: 8/14/2007 Posts: 9
|
Hi, I want to know something, I hope you can help me.
I am using a CallBackPanel and contains a ASP GridView control, the callbackpanel has set the GridView as a trigger. That means that all the GridView events, trigger the callbackpanel, that works fine.
But, this is my question, the GridView control has set the Sorting event, PageChanging event, RowEditing event, RowUpdating event, RowCancelingEdit event, etc. I want to know if I can say to the callbackpanel which event of the gridview control triggers the callbackpanel and which one don't. Because, now every event of the gridview triggers the callback panel.
I'd appreciate you can help me.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There are several ways to do that, but all of which will require JavaScript code. I believe one way to do it is to handle the CallbackPanel's ClientSideBeforeExecute, inside that event handler you can check the standard ASP.NET __EVENTTARGET and __EVENTARGUMENT form variable to see if you want to proceed. Another way is to trigger the CallbackPanel manually with eo_Callback JavaScript function.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/14/2007 Posts: 9
|
Hi, I think I was going right. I havd the same idea, I got the event target from JavaScript in the ClientSideBeforeExecute event, but I am stuck there, I don't know how to cancel the callback and do the postback or do the postback itself.
Please If you can tell me how I do that, I will thank you for a lifetime.
Please send me one example for each way you said I can do that.
With EventTarget an EventArgument and with eo_Callback JS function.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would return false from the handler to cancel the callback.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/14/2007 Posts: 9
|
Ok. Thanks man. I tried that and tha Callback is canceled, it doesn't do anything in the event I specified.
But now I need to do a PostBack and execute the code behind.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
That would be something you need to work out by yourself. We won't be able to support on generic ASP.NET programming questions.
|
|
Rank: Newbie Groups: Member
Joined: 8/14/2007 Posts: 9
|
OK. Man, no problem. Thanks anyway.
|
|