This is a migrated thread and some comments may be shown as answers.
Client Side Data Binding RadGrid & ItemTemplate Problem
3 Answers 104 Views
This is a migrated thread and some comments may be shown as answers.
Alim
Top achievements
Rank 1
Alim asked on 25 Jun 2009, 04:27 PM
How can i use ItemTemplate with Client-Side RadGrid data binding ?
i use a web method to bind data on client side..

here is my sample:
it hasn't worked out...

        <telerik:RadGrid ID="IndividualHistoryGrid" AllowFilteringByColumn="true" 
            runat="server" GridLines="None" AllowPaging="true" 
            AllowSorting="true" OnPreRender="IndividualHistoryGrid_PreRender" 
            PageSize="6"
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <MasterTableView TableLayout="Fixed" DataKeyNames="IndividualCode" ClientDataKeyNames="IndividualCode"
                <ItemTemplate> 
                    <asp:Panel ID="ItemContainer" runat="server"
                        <b>Name:</b> 
                        <%# Eval("Name")%> 
                    </asp:Panel> 
                </ItemTemplate> 
            </MasterTableView> 
            <GroupingSettings CaseSensitive="false" /> 
            <ClientSettings> 
                <DataBinding SelectMethod="GetDataAndCount" Location="IndividualGetHistoryMethod.aspx" 
                    SortParameterType="Linq"  FilterParameterType="Linq"
                </DataBinding> 
                <ClientEvents OnDataBinding="onDataBinding"></ClientEvents> 
            </ClientSettings> 
        </telerik:RadGrid> 

i tried the sample on the below link:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx



3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 29 Jun 2009, 09:05 AM
Hello Alim,

When using client-side data-binding RadGrid will manage to populate a control in GridTemplateColumn  if the control in that ItemTemplate has ID set equal to the DataField property of that column.

<%# Eval("Name")%> is evaluated on server, not on client side.

You read more on RadGrid client-side data-binding on the following article:
http://www.telerik.com/help/aspnet-ajax/client-side-binding.html

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
NetDeveloper1107
Top achievements
Rank 1
answered on 22 Apr 2010, 10:33 AM
I need to show LinkButton in ItemTemplate with Radgrid Client side binding.Is It possible and how?
0
Nikolay Rusev
Telerik team
answered on 22 Apr 2010, 01:25 PM
Hello NetDeveloper1107,

As you have duplicated your posts I have answer you on the following forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-client-side-binding-with-gridtemplatecolumn-and-labels.aspx

Regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Alim
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
NetDeveloper1107
Top achievements
Rank 1
Share this question
or