I have a simple RADGrid bound to a SQLDataSource with a RadTemplateColumn/EditItemTemplate RadTextBox control. I used the Telerik provided example to apply the bound value but it only is visible in EditMode. What am I missing?
Thank you,
SteveO
<telerik:RadGrid ID="RadGrid1"
runat="server"
AllowAutomaticDeletes="True"
AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
GridLines="None"
OnItemInserted="RadGrid1_ItemInserted"
OnItemCreated="RadGrid2_ItemCreated"
OnItemUpdated="RadGrid1_ItemUpdated"
OnInsertCommand="RadGrid1_ItemInsert"
OnUpdateCommand="RadGrid1_ItemUpdate"
Skin="Simple"
ShowStatusBar="True"
DataSourceID="SqlDataSource2"
AllowPaging="True" >
<ValidationSettings EnableValidation="true" ValidationGroup="DropDownValidate" />
<MasterTableView runat="server"
EditMode="InPlace"
CommandItemDisplay="Top"
DataSourceID="SqlDataSource2"
AutoGenerateColumns="false"
ExpandCollapseColumn-ButtonType="ImageButton"
ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"
ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png"
DataKeyNames="ActivityID"
InsertItemPageIndexAction="ShowItemOnCurrentPage" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
CancelImageUrl="~/Images/filterCancel.png"
UpdateImageUrl="~/Images/selecttag.png"
InsertImageUrl="~/Images/add-icon[2].png"
EditImageUrl="~/Images/edit-icon[1].png" >
</EditColumn>
</EditFormSettings>
<Columns>
<telerik:GridTemplateColumn DataField="ActDescription" HeaderText="Description" UniqueName="ActDescription" Display="true">
<EditItemTemplate>
<telerik:RadTextBox ID="Description" runat="server" Text='<%# Bind("ActDescription")
TextMode="MultiLine" Width="300"></telerik:RadTextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:CIMT %>"
DeleteCommand="DELETE FROM [CIMT_T_Activities] WHERE [ActivityID] = @ActivityID"
InsertCommand="INSERT INTO [CIMT_T_Activities] ([ActDescription], [ActToDate], [ActFromDate], [UnitLogID], [InsertBy], [InsertDate], [UpdateBy], [UpdateDate]) VALUES (@ActDescription, @ActToDate, @ActFromDate, @UnitLogID, @InsertBy, @InsertDate, @UpdateBy, @UpdateDate)"
SelectCommand="SELECT [ActivityID], [ActDescription], [ActToDate], [ActFromDate], [UnitLogID], [InsertBy], [InsertDate], [UpdateBy], [UpdateDate] FROM [CIMT_T_Activities] WHERE [UnitLogID] = @UnitLogID"
UpdateCommand="UPDATE [CIMT_T_Activities] SET [ActDescription] = @ActDescription, [ActToDate] = @ActToDate, [ActFromDate] = @ActFromDate, [UnitLogID] = @UnitLogID, [UpdateBy] = @UpdateBy, [UpdateDate] = @UpdateDate WHERE [ActivityID] = @ActivityID">
<SelectParameters>
<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ActivityID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />
<asp:Parameter Name="ActDescription" Type="String" />
<asp:Parameter DbType="DateTime" Name="ActToDate" />
<asp:Parameter DbType="DateTime" Name="ActFromDate" />
<asp:Parameter Name="InsertBy" Type="String" />
<asp:Parameter DbType="DateTime" Name="InsertDate" />
<asp:Parameter Name="UpdateBy" Type="String" />
<asp:Parameter DbType="DateTime" Name="UpdateDate" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />
<asp:Parameter Name="ActDescription" Type="String" />
<asp:Parameter DbType="DateTime" Name="ActToDate" />
<asp:Parameter DbType="DateTime" Name="ActFromDate" />
<asp:Parameter Name="InsertBy" Type="String" />
<asp:Parameter DbType="DateTime" Name="InsertDate" />
<asp:Parameter Name="UpdateBy" Type="String" />
<asp:Parameter DbType="DateTime" Name="UpdateDate" />
<asp:Parameter Name="ActivityID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>