|
Rank: Newbie Groups: Member
Joined: 6/5/2011 Posts: 6
|
Hi,
I have a custom column CC in the grid, that have a dropdown DD (select) for editing cell values in custom column template.
For showing the right option in DD, I have written 2 scripts for "begin_edit" and "end_edit" for CC events. Those scripts are being created by the server and sent with the page.
If the page is "new", also has not make any postback, everything is ok. The scripts are working and everyone is happy. :)
But right after the first postback scripts are not working.
If I look at the runtime code (View source from browser), I can see that the scripts are on the page, but events are not "hooked".
Do you have any idea to solve this problem ?
Hakan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That most likely is a problem in your code. The Grid shouldn't behave differently on begin_edit and end_edit events between non-posting back or posting back pages. You can try to isolate the problem into a test page, if the problem still occurs, you can either send the page to us or post it here. Once we have that we will be happy to take a look. Make sure your test page contains only code needed to reproduce the problem and also runs independently.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 6/5/2011 Posts: 6
|
Hi,
I pointed out, that the problem by this situation is ;
after postback, begin_edit and end_edit events are not "registered" to the grid column like we do it from the server-side : ClientSideBeginEdit = "begin_edit"
Therefore the scripts are on the page but they are not working.
After some searching on the net, I see, that this is a common problem by partial updates. The solution is to "register" the events for every page_Load. ASP.NET AJAX have a predefined function for that : function pageLoad(){...} pageLoad is working for every postback either if it is a partial postback.
Now, the only thing to do is, "register" the events to the grid column.
Is there any way to "register" the events to the grid column, by client side with javascript ?
Thanks in advance.
Hakan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You don't need to "register" anything with our Grid. As long as you set the property correctly, it will work. This shouldn't have anything to do with whether you AJAX update your Grid or not.
Thanks!
|
|