Hi,
I am trying to use the declarative client binding method to bind radgrid using webservice. I am having trouble passing the custom argument. When i use the standard 4 arguments everything works. Once i add my custom argument it stops working. i don't get any error, grid doesn't even call the webservice.
Here is what i have in ASPX...
Here is the java script
i tried to use as listed in the demo, but no luck
Here is the Webservice
I greatly appreciate if someone can figure out what i am doing wrong. I looked this post which shows the same as demo but for some reason it's not working for me.
Thanks,
I am trying to use the declarative client binding method to bind radgrid using webservice. I am having trouble passing the custom argument. When i use the standard 4 arguments everything works. Once i add my custom argument it stops working. i don't get any error, grid doesn't even call the webservice.
Here is what i have in ASPX...
| <telerik:RadGrid ID="RadGrid1" AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true" |
| AutoGenerateColumns="false" runat="server"> |
| <MasterTableView > |
| <Columns> |
| <telerik:GridBoundColumn DataField="DocID" HeaderText="DocID" /> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Title" /> |
| </Columns> |
| </MasterTableView> |
| <PagerStyle Mode="NumericPages" /> |
| <ClientSettings> |
| <DataBinding Location="http://localhost/iProWS/GetGridData.asmx" |
| SelectMethod="GetDataAndCount" EnableCaching="true" /> |
| <ClientEvents OnDataBinding="RadGrid1_DataBinding" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
Here is the java script
| function RadGrid1_DataBinding(sender, args) |
| { |
| var methodArguments = args.get_methodArguments(); |
| methodArguments.WhereCond = "myValue"; |
| args.set_methodArguments(methodArguments); |
| } |
| function RadGrid1_DataBinding(sender, args) |
| { |
| var myMethodArguments = new Object(); |
| myMethodArguments.WhereCond = "myValue"; |
| args.set_methodArguments(myMethodArguments); |
| } |
Here is the Webservice
| <WebMethod(EnableSession:=True)> _ |
| Public Function GetDataAndCount(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As List(Of GridSortExpression), ByVal filterExpression As List(Of GridFilterExpression), ByVal WhereCond As String) As Dictionary(Of String, Object) |
| Dim data As New Dictionary(Of String, Object)() |
| data.Add("Data", GetData(startRowIndex, maximumRows, sortExpression, filterExpression, WhereCond)) |
| data.Add("Count", DirectCast(Session("Count"), Integer)) |
| Return data |
| End Function |
I greatly appreciate if someone can figure out what i am doing wrong. I looked this post which shows the same as demo but for some reason it's not working for me.
Thanks,