I have a telerik grid. I have taken an item template column , in which a label control is taken. I don't use Eval to bind data to a column. I have set the label Id with Datafield property. I want to bind the grid via client side databinding using web method. first I am returning a serialized json string , then I Deserialized this json string in a javascript, which is converted to a list object. then I pass this list object using set_dataSource(listobject). My requirement is that I have a search button. By clicking it , it will fire an OnClientClick event and binds the grid. My problem is that my grid is binding but no data is showing in label control of that grid. I mean to say, suppose i have four records. After clicking search button grid shows four rows but no data will be shown.
My grid is looking like that
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="false" AutoGenerateColumns="true" Skin="Web20" AllowSorting="false" Visible="true" >
<HeaderStyle BackColor="#3ABD59" Font-Bold="True" Wrap="False" />
<mastertableview cellspacing="-1" AllowMultiColumnSorting="true" DataKeyNames="CustomerId" ClientDataKeyNames="CustomerId">
<Columns>
<telerik:GridTemplateColumn HeaderText="Customer ID" UniqueName="UniCustomerId" >
<ItemTemplate>
<asp:Label runat="server" ID="CustomerId" Style="width:150px;" ></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</mastertableview>
<PagerStyle AlwaysVisible="True" />
</telerik:RadGrid>
I have tried with databound column like below
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="false" AutoGenerateColumns="true" Skin="Web20" AllowSorting="false" Visible="true" >
<HeaderStyle BackColor="#3ABD59" Font-Bold="True" Wrap="False" />
<mastertableview cellspacing="-1" AllowMultiColumnSorting="true" DataKeyNames="CustomerId" ClientDataKeyNames="CustomerId">
<Columns>
<telerik:GridBoundColumn DataField="CustomerId" HeaderText="Customer ID" UniqueName="UniCustomerId" DataType="System.String" >
</telerik:GridBoundColumn>
</Columns>
</mastertableview>
<PagerStyle AlwaysVisible="True" />
</telerik:RadGrid>
but results are same.
I am stuck with this problem. Any help would be a great favor for me.