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

radGrid client side binding

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vaibhav
Top achievements
Rank 1
Vaibhav asked on 27 Oct 2008, 07:37 AM
Hi,

I am trying to refresh grid at regular interval as follow:

===========================
var myInterval = window.setInterval("refreshRadGrid();",30000);

        function refreshRadGrid()
        {
            var s_param;
            s_param = document.getElementById("ctl00_cphMain_hdGridParam").value;
            
            PageMethods.cBindGrid(s_param,updateGrid);
            
        }
                   
        function updateGrid(result)
        {
            
            var tableView = $find("<%= dgrdBroadcasts.ClientID %>").get_masterTableView();
            var virtualCount = tableView.getCellByColumnUniqueName(tableView.get_dataItems()[0],"total_rows").innerHTML;
            
            tableView.set_virtualItemCount(virtualCount);
            tableView.set_dataSource(result);
            tableView.dataBind();
        }

===========================

This gives some problem like grid is refreshed but still shows removed record from database. Few columns get blank(I am trying to find more).

Please give input on the issue.

Thanks & Regards,
Vaibhav

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 29 Oct 2008, 10:03 AM
Hello Vaibhav,

You can find a similar example on the link below.
Live data from web service

However if you still have issues I suggest that you to give us more information about how you use RadGrid in your application.

Greetings,
Nikolay
the Telerik team

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