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

Client event ondatabound?

3 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 15 Dec 2008, 06:51 PM
I see in  the documentation here:
documentation radGrid client OnDataBound

When trying to add this to my grid, it says it does not exist. I am using aspnet ajax Q2 2008 version.

Is there a client side ondatabound?

What I really need is on the client side to know when there are no more outstanding asynchronous events. I need to run client side code after a grid has been completely rendered on the screen after I call mygrid.bind(); on the server.

If there is no ondatabound client side event, how would be the best way for me to signal that the grid has been completed bound?

Thanks,
Laura


3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Dec 2008, 07:43 AM
Hi Laura,

OnDataBound is available with our Q3 release - you can use OnGridCreated to achieve your goal.

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Laura
Top achievements
Rank 1
answered on 16 Dec 2008, 05:52 PM
Thank you Vlad. The client side ondatabound only works with client side databinding. So if I bind the grid on the C# side, this does not work, correct?

And if I want to bind on the client, I have to first set the datasource before I bind, right?

I am trying to do that, but I need to use masterTable.set_dataSource(<JSON format  datasource>); My datasource is defined using sqldatasource and all I have is an ID for the sqldatasource. How would I specify the JSON fomat for this?

My final question, and the real problem I am having is this:

What I really need is on the client side to know when there are no more outstanding asynchronous events. I need to run client side code after a grid has been completely rendered on the screen after I call mygrid.bind(); or onPageIndexChanged on the server.

Basically, any time the grid has been rebound to new data, I need to know when it was rebound and all outstanding asynchronous events have completed.


Thanks,
Laura



0
Iana Tsolova
Telerik team
answered on 19 Dec 2008, 12:44 PM
Hello Laura,

Try using the OnGridCreated client-side event of the grid for your purpose. It is fired after the grid is created/recreated on the client, on each postback/callback.

Regarding the client-side data binding of RadGrid, please review the below examples for detailed information:
http://www.telerik.com/help/aspnet-ajax/client-side-binding.html
http://www.telerik.com/help/aspnet-ajax/grid-live-data-from-web-service.html

Let me know if this helps.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Laura
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Laura
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or