This is a migrated thread and some comments may be shown as answers.

Batch EditMode and Nested/Detail Templates

0 Answers 21 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
josh asked on 09 Feb 2017, 05:14 PM


I have a grid in batch edit/cell mode, and everything works.

My problem is that one of the fields is very large - potentially two or three paragraphs of text. I'd like to move this onto it's own row, if possible. I've tried using a radtextbox within a NestedViewTemplate and DetailItemTemplate, and I can get the data to display in both, but I can't figure out how to include it in batch saves. <%#Bind("FieldName")%> doesn't work. 

What would be the best way to accomplish this?

Here's a sample of what I have:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="true" AutoGenerateColumns="false" DataSourceID="DataSource1">
     <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ItemNumber" EditMode="Batch" AutoGenerateColumns="false" 
        <BatchEditingSettings EditType="Cell" HighlightDeletedRows="true" />
             <telerik:RadTextBox ID="txtDesc" runat="server" Text='<%#Bind("Desc")%>' />
             <telerik:GridBoundColumn UniqueName="ItemNumber" DataField="ItemNumber" HeaderText="Item Number" />
 <asp:SqlDataSource runat="server" ID="DataSource1" ConnectionString="(ConnectionString)" ConflictDetection="OverwriteChanges"
     SelectCommand="SELECT * FROM [Table]"
     InsertCommand="INSERT INTO [Table] ([Name], [Desc]) VALUES (@Name, @Desc)"
     UpdateCommand="UPDATE [Table] SET [Name]=@Name, [Desc]=@Desc WHERE [ItemNumber]=@ItemNumber">
         <asp:Parameter Name="Name" Type="String" />
         <asp:Parameter Name="Desc" Type="String" />
         <asp:Parameter Name="Name" Type="String" />
         <asp:Parameter Name="Desc" Type="String" />
         <asp:Parameter Name="ItemNumber" Type="Int32" />

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question