Click here to Skip to main content
15,921,203 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all,
This grid I am using to maintain data in front-end. I am storing all the data in the session. Now the problem I am getting while sending the session datatable to the stored procedure. i am using Entity Framework.
ASP.NET
<telerik:RadGrid ID="RadGridDetails"  runat="server" AutoGenerateColumns="false" ShowHeader="true"
                       ShowFooter="true" GridLines="None"
             önitemcommand="RadGridDetails_ItemCommand"  >
                       <mastertableview editmode="InPlace" showfooter="true" enablenorecordstemplate="true">
                        ShowHeadersWhenNoRecords="true">
                           <norecordstemplate>
                            <div>There are no records to display</div>
                          </norecordstemplate>
                           <commanditemsettings exporttopdftext="Export to PDF" />
                           <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column">
                               Visible="True">
                           </rowindicatorcolumn>
                           <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column">
                               Visible="True">
                           </expandcollapsecolumn>
                           <columns>
                               <telerik:gridtemplatecolumn headertext="ID" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lblid" runat="server" Text='<%#Eval("ID") %>'>
                                   </itemtemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="ChildrenName" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lblchildren" runat="server" Text='<%#Eval("ChildrenName") %>'>
                                   </itemtemplate>
                                   <edititemtemplate>
                                       <telerik:RadTextBox ID="txtchildren"  runat="server"
                                           Text='<%#Eval("ChildrenName") %>'>

                                   </edititemtemplate>
                                   <footertemplate>
                                       <telerik:RadTextBox ID="txtaddchildren"  runat="server">

                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="Name" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lblPetTypeName" runat="server" Text='<%#Eval("Name") %>'>
                                   </itemtemplate>
                                   <edititemtemplate>
                                       <telerik:RadComboBox ID="ddlPetTypeName"  runat="server">

                                     </edititemtemplate>
                                   <footertemplate>
                                       <telerik:RadComboBox ID="ddladdPetTypeName"  runat="server"
                                           DataSourceID="LinqDataSourcePetType" DataTextField="Name" DataValueField="ID" >


                                       <asp:LinqDataSource ID="LinqDataSourcePetType" runat="server"
                                           ContextTypeName="DBLayer.DataClasses1DataContext" EntityTypeName=""
                                           Select="new (ID, Name)" TableName="PetTypes">


                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="DOB" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lbldob" runat="server" Text='<%#Eval("DOB") %>'>
                                   </itemtemplate>
                                   <edititemtemplate>
                                       <telerik:RadDatePicker ID="ddlDOB"  runat="server"
                                           DateInput-DateFormat="dd-MMM-yyyy" DateInput-Enabled="false"
                                           SelectedDate='<%#Eval("DOB") %>'>

                                   </edititemtemplate>
                                   <footertemplate>
                                       <telerik:RadDatePicker ID="ddlAddDOB"  runat="server"
                                           DateInput-DateFormat="dd-MMM-yyyy" DateInput-Enabled="false">

                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="ParentType" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lblParentName" runat="server" Text='<%#Eval("ParentType") %>'>
                                   </itemtemplate>
                                   <edititemtemplate>
                                       <telerik:RadTextBox ID="txtParentType"  runat="server"
                                           Text='<%#Eval("ParentType") %>'>

                                   </edititemtemplate>
                                   <footertemplate>
                                       <telerik:RadTextBox ID="txtaddParentType"  runat="server">

                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="PetName" xmlns:telerik="#unknown">
                                   <itemtemplate>
                                       <asp:Label ID="lblpetName" runat="server" Text='<%#Eval("PetName") %>'>
                                   </itemtemplate>
                                   <edititemtemplate>
                                       <telerik:RadTextBox ID="txtPetName"  runat="server" Text='<%#Eval("PetName") %>'>

                                   </edititemtemplate>
                                   <footertemplate>
                                       <telerik:RadTextBox ID="txtaddPetName"  runat="server">

                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                               <telerik:gridtemplatecolumn headertext="Edit | Delete" xmlns:telerik="#unknown">
                                   <edititemtemplate>
                                       <asp:LinkButton ID="btnupdate" runat="server"
                                           CommandArgument='<%#Eval("id") %>' CommandName="Update" Text="Update">
                                         |  
                                       <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Cancel"
                                           Text="Cancel">
                                   </edititemtemplate>
                                   <itemtemplate>
                                       <asp:LinkButton ID="btnedit" runat="server" CommandName="Edit" Text="Edit">
                                         |  
                                       <asp:LinkButton ID="btndelete" runat="server"
                                           CommandArgument='<%#Eval("id") %>' CommandName="Delete" Text="Delete">
                                   </itemtemplate>
                                   <footertemplate>
                                       <asp:LinkButton ID="btnadd" runat="server" CommandName="Insert" Text="Add">
                                   </footertemplate>
                               </telerik:gridtemplatecolumn>
                           </columns>
                           <editformsettings>
                               <editcolumn filtercontrolalttext="Filter EditCommandColumn column">
                               </editcolumn>
                           </editformsettings>
                       </mastertableview>
                       <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                       <itemstyle horizontalalign="Center" verticalalign="Top" />
                       <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                       <filtermenu enableimagesprites="False">
                       </filtermenu>


Any help will be appreciated.
Thank you.
Posted
Updated 30-Aug-12 2:52am
v4

Did you try at all?

Try the same way as you do for normal grid. If you face issues that are Telerik specific, then post your issue at their respective forums:TELERIK Forum[^]

Also look here: Telerik RadGrid Forum[^]
 
Share this answer
 
Comments
Manas Bhardwaj 30-Aug-12 8:56am    
Right, telerik forums will have more focused responses. +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900