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

Client binding without webservice

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Izik
Top achievements
Rank 1
Izik asked on 13 Sep 2011, 10:49 AM
Hi,

I would like to do a client-side binding on radgrid without calling a webservice. all of the examples that I've seen use a webservice...

I want the user to add/remove/edit rows to the RadGrid using an external form (all in javascript) and only when he's done the data will be sent to the server.
My questions are:
1. what is the format of the datasource that I should pass to "set_dataSource"? if I want to bind the data or add a new row. 
   can I do something like: 
   var arr = new Array();
    arr.push( {field1: value1, field2: value2 .... } )
    myGrid.set_dataSource(arr);
    myGrid.data_bind();

2. how do I extract the grid's data and send it back to the server?

Thanks in advanced!

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 16 Sep 2011, 08:15 AM
Hi Izik,

When binding RadGrid on the client, the data must have a valid JSON syntax, in order to be properly parsed. The data itself may be coming from a WebService/PageMethod, or declared statically. More information you could find in the following online documentation article:
http://www.telerik.com/help/aspnet-ajax/grid-client-side-binding-specifics.html

Additionally you could transfer data from client to the server via ajaxRequest client side method of the RadAjaxManager or RadAjaxPanel.

I hope this helps.

Greetings,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Tags
Grid
Asked by
Izik
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or