查找网格控件并与存储过程一起使用 [英] Finding grid control and using with store procedure

查看:85
本文介绍了查找网格控件并与存储过程一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我用来维护前端数据的网格.我将所有数据存储在会话中.现在,我在将会话数据表发送到存储过程时遇到了问题.我正在使用Entity Framework.

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.

<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>



任何帮助将不胜感激.
Thank you.



Any help will be appreciated.
Thank you.

推荐答案

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[^]
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[^]


Try the links below:
Table-Valued Parameter in Stored Procedure and the Entity Framework 4.0[^]
Passing an array/table to stored procedure through Entity Framework[^]
Can you pass an enity-framework table/collection as a parameter into a function[^]
Table-Valued Parameter in Stored Procedure and the Entity Framework 4.0[^]




祝一切顺利.
--Amit
Try the links below:
Table-Valued Parameter in Stored Procedure and the Entity Framework 4.0[^]
Passing an array/table to stored procedure through Entity Framework[^]
Can you pass an enity-framework table/collection as a parameter into a function[^]
Table-Valued Parameter in Stored Procedure and the Entity Framework 4.0[^]




All the best.
--Amit


这篇关于查找网格控件并与存储过程一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆