I cannot retrieve the textbox.text from from Editformsettings of the Radgrid1. The string returns empty all the time. What is wrong with the code after researching seems that the way i am doing it is correct. Any suggestions will be appreciated.
CODEBEHIND:
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
If e.CommandName = "PerformInsert" Then
If (TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode) Then
Dim editItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
Dim Mytab As TextBox = DirectCast(editItem.FindControl("tbTabName"), TextBox)
Dim LocalTab As New SWBC.Weblet.BO.Mortgage.MtgTabs
With LocalTab
.TabName = Mytab.Text
End With
MyTabsList.Add(LocalTab)
End If
End If
ASPX Page
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
</telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="false" AutoGenerateColumns="true"
AllowPaging="true" AllowSorting="true" Skin="Vista" Width="50%" GridLines="Both"
PageSize="50" EnableViewState="true" OnInsertCommand="RadGrid1_InsertCommand" >
<ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" >
<Csv RowDelimiter="Comma" />
</ExportSettings>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="false" CommandItemDisplay="top" Height="100%" GridLines="Both"
EditMode="PopUp" DataKeyNames="Count" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"/>
</RowIndicatorColumn>
<CommandItemSettings AddNewRecordText="Add Tab" />
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn HeaderStyle-Width="20px" >
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="Count" DataType="System.Int16" HeaderText="Item" ReadOnly="True" SortExpression="Item">
<ItemStyle Width="20px" HorizontalAlign="Center" />
<HeaderStyle Width="20px" HorizontalAlign="Center" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TabName" DataType="system.string" HeaderText="TabName" ReadOnly="True" SortExpression="TabName">
<ItemStyle Width="120px" HorizontalAlign="Center" />
<HeaderStyle Width="120px" HorizontalAlign="Center" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TabText" HeaderText="TabText" SortExpression="TabText" UniqueName="TabText">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column" HeaderStyle-Width="50px" ItemStyle-Width="50px">
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings InsertCaption="Add New Tab" EditFormType="Template" >
<PopUpSettings Width="640" />
<FormTemplate >
<table id="Table1" cellspacing="1" cellpadding="10" border="0" width="660">
<tr>
<td ></td>
<td> <asp:HiddenField runat="server" ID="hdCount" Value='<%# Bind( "Count" ) %>' /></td>
</tr>
<tr>
<td >Tab Name:</td>
<td>
<asp:TextBox runat="server" ID="tbTabName" Text='<%# Bind( "TabName" ) %>'>
</asp:TextBox>
</td>
</tr>
<tr>
<td valign="top">Tab Text:</td>
<td>
<telerik:RadEditor runat="server" ID="txtBody" Width="525px" >
<Tools>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=AjaxSpellCheck />
<telerik:EditorTool Name=findandreplace />
<telerik:EditorTool Name=SelectAll />
<telerik:EditorTool Name=copy />
<telerik:EditorTool Name=Cut Visible=true />
<telerik:EditorTool Name=paste/>
<telerik:EditorToolStrip Name="paste options" >
<telerik:EditorTool Name=pasteashtml />
<telerik:EditorTool Name=pastefromword />
<telerik:EditorTool Name=pastefromwordnofontsnosizes />
</telerik:EditorToolStrip>
<telerik:EditorTool Name=undo />
<telerik:EditorTool Name=redo />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=linkmanager />
<telerik:EditorTool Name=unlink />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=insertparagraph />
<telerik:EditorTool Name=inserthorizontalrule />
<telerik:EditorTool Name=insertdate />
<telerik:EditorTool Name=InsertTime />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=formatblock />
<telerik:EditorTool Name=fontname />
<telerik:EditorTool Name=fontsize />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=bold />
<telerik:EditorTool Name=italic />
<telerik:EditorTool Name=underline />
<telerik:EditorTool Name=strikethrough />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=justifyleft />
<telerik:EditorTool Name=justifycenter />
<telerik:EditorTool Name=justifyright />
<telerik:EditorTool Name=justifynone />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=indent />
<telerik:EditorTool Name=outdent />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=insertorderedlist />
<telerik:EditorTool Name=insertunorderedlist />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=toggletableborder />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=forecolor />
<telerik:EditorTool Name=backcolor />
<telerik:EditorTool Name=formatstripper />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=insertsymbol />
<telerik:EditorTool Name=inserttable />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup >
<telerik:EditorTool Name=converttolower />
<telerik:EditorTool Name=converttoupper />
<telerik:EditorTool Name=zoom />
<telerik:EditorTool Name=ModuleManager />
<telerik:EditorTool Name=togglescreenmode />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
</td>
</tr>
</table>
<table width="623">
<tr>
<td align="right" colspan="2">
<asp:Button ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>
</asp:Button>
<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
</asp:Button>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>