I am using Rad Grid and one of its columns is a template column having RadNumeric Textbox of Currency type in it.
By default, RadGrid is disabled unless an external button is clicked to enable it. its working perfectly fine. But when that button enables the grid, all functions of grid works perfect but this RadNumeric Textbox is still disabled. If I use simple Textbox then that works perfectly fine. Moreover after simple postback/callback (like a sort or any other event that calls NeedDataSource event) rectify the problem and after that RadTextbox works perfectly fine. I am giving a short peek of grid structure. Please have a look and guide where I am doing wrong.
<telerik:RadGrid ID="uxProposals" Width="97%" AllowPaging="True" runat="server" AutoGenerateColumns="false" OnNeedDataSource="uxProposals_NeedDataSource" AllowSorting="true" Skin="Vista" GridLines="None" OnItemDataBound="uxProposals_ItemDataBound">
<MasterTableView Width="100%" AllowMultiColumnSorting="false">
<Columns>
<telerik:GridBoundColumn HeaderText="ProposalID" Visible="false" DataField="ProposalID" />
<telerik:GridTemplateColumn HeaderText="Award<br/>Amount" UniqueName="TemplateColumn" ItemStyle-Width="25%" InitializeTemplatesFirst="false">
<ItemTemplate>
<table cellspacing="0" width="100%" style="border-style: none">
<tr style="border-style: none">
<td style="border-style: none">
<telerik:RadNumericTextBox ID="uxAwardAmount" runat="server" MaxValue="99999999.99" Type="Currency" Skin="Vista"></telerik:RadNumericTextBox>
<asp:TextBox ID="uxAwardAmount_tochkProb" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<HeaderContextMenu Skin="Vista">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<ExportSettings ExportOnlyData="False" FileName="ReviewerAssignmentStatus" OpenInNewWindow="true" IgnorePaging="True"></ExportSettings>
<PagerStyle Mode="NextPrevAndNumeric" />
<SortingSettings SortedBackColor="Azure" />
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
<FilterMenu EnableTheming="True">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
Radwindow1.VisibleOnPageLoad =
true;
Radwindow1.NavigateUrl = url;
| protected void listBoxLocations_ItemDataBound(object sender, RadListBoxItemEventArgs e) |
| { |
| if (attribute) |
| e.Item.ForeColor = System.Drawing.Color.Gray; |
| } |
Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim s As String
s =
""
For Each item As GridEditableItem In RadGridEmpData.MasterTableView.GetItems(GridItemType.EditFormItem)
If item.IsInEditMode Then
Dim objRadEditor As RadEditor
objRadEditor =
CType(item.FindControl("RadEditorNotes"), RadEditor)
s = objRadEditor.Content
End If
Next
End Sub
<ProgressTemplate>
<asp:Image ID="ImageSearch" runat="server" ImageAlign="AbsMiddle" ImageUrl="Images/indicator_mozilla_blu.gif" />
Processing...
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" Visible="true" runat="server">
<ContentTemplate>
<telerik:RadGrid ID="RadGridEmpData" runat="server" Width="800px" AllowPaging="True"
AutoGenerateColumns="False"
ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
GridLines="None" Height="200px" ShowGroupPanel="True" AllowFilteringByColumn="True" >
<ClientSettings AllowDragToGroup="True">
<Scrolling FrozenColumnsCount="4"/>
</ClientSettings>
<MasterTableView EditMode="PopUp" CommandItemDisplay="Top" Height="200px" >
<columns>
<telerik:GridEditCommandColumn EditImageUrl="IMAGES/Editor.gif"></telerik:GridEditCommandColumn>
<telerik:GridTemplateColumn AllowFiltering="False" SortExpression="EmployeeNo" DataField="EmployeeNo" HeaderText="Employee No" UniqueName="EmployeeNo">
<ItemTemplate>
<asp:LinkButton ID="LinkButtonEmployeeNo" runat="server" Text='<%#Eval("EmployeeNo")%>'></asp:LinkButton>
<%
--<asp:LinkButton ID="LinkButton1" runat="server"><%#Eval("EmployeeNo")%></asp:LinkButton>--%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn AllowFiltering="False"
DataField="ProposalVersionID"
HeaderText="Proposal Version"
SortExpression="ProposalVersionID"
UniqueName="ProposalVersionID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Site" HeaderText="Site" SortExpression="Site" UniqueName="Site"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EmployeeName" HeaderText="Employee Name" SortExpression="EmployeeName" UniqueName="EmployeeName"><ItemStyle Width="250px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OriginalCC" HeaderText="OriginalCC" SortExpression="OriginalCC" UniqueName="OriginalCC"><ItemStyle Width="150px" /></telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="LevelDesc" HeaderText="LevelDesc" UniqueName="TemplateColumn">
<ItemTemplate>
<%
# Eval("LevelDesc") %>
</ItemTemplate>
</telerik:GridTemplateColumn>
<custom:MyCustomFilteringColumn DataField="LevelDesc" FilterControlWidth="180px" HeaderText="Custom TemplateColumn LevelDesc" UniqueName="TemplateColumn1">
<headerstyle width="25%" />
<itemtemplate >
<%
# DataBinder.Eval(Container.DataItem, "LevelDesc") %>
</
itemtemplate>
</custom:MyCustomFilteringColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="CostRate" DataType="System.Decimal" HeaderText="CostRate" SortExpression="CostRate" UniqueName="CostRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="AssessmentDate" DataType="System.DateTime" HeaderText="AssessmentDate" SortExpression="AssessmentDate" UniqueName="AssessmentDate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="CostRate" DataType="System.Decimal" HeaderText="CostRate" SortExpression="CostRate" UniqueName="CostRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="BurdenRate" DataType="System.Decimal" HeaderText="BurdenRate" SortExpression="BurdenRate" UniqueName="BurdenRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="LaborSchedule" HeaderText="LaborSchedule" SortExpression="LaborSchedule" UniqueName="LaborSchedule"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="LaborCategoryCode" HeaderText="LaborCategoryCode" SortExpression="LaborCategoryCode" UniqueName="LaborCategoryCode"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="ChangedUserId" HeaderText="ChangedUserId" SortExpression="ChangedUserId" UniqueName="ChangedUserId"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="EnteredBy" HeaderText="EnteredBy" SortExpression="EnteredBy" UniqueName="EnteredBy"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="Notes" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="Education" HeaderText="Education" SortExpression="Education" UniqueName="Education"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowFiltering="False" DataField="Experience" HeaderText="Experience" SortExpression="Experience" UniqueName="Experience"><ItemStyle Width="120px" /></telerik:GridBoundColumn>
</columns>
<EditFormSettings EditFormType="Template" CaptionDataField="EmployeeNo" CaptionFormatString="Edit Employee Number: {0}" >
<FormTemplate >
<table id="Table2" cellspacing="2" cellpadding="1" width="50%" border="1" rules="none"
style="border-collapse: collapse; background: white;">
<tr class="EditFormHeader">
<td colspan="2" style="font-size: small">
<b> </b></td>
</tr>
<tr>
<td colspan="2">
<b>Employee Info:</b></td>
</tr>
<tr>
<td style="vertical-align: top; height: 248px; text-align: left">
<table id="Table6" cellspacing="1" cellpadding="1" width="200" border="0" class="module">
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
Employee No:
</td>
<td>
<asp:Label ID="LabelEmployeeNo" runat="server" Text='<%# Bind( "EmployeeNo" ) %>'>
</asp:Label></td>
</tr>
<tr>
<td>
Employee Name:
</td>
<td>
<asp:TextBox ID="TextBoxEmployeeName" runat="server" Text='<%# Bind( "EmployeeName") %>' tabindex="1"></asp:TextBox></td>
</tr>
<tr>
<td>
CC:
</td>
<td>
<asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind( "OriginalCC") %>' TabIndex="2">
</asp:TextBox></td>
</tr>
<tr>
<td>
Site:
</td>
<td>
<asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind( "Site") %>' TabIndex="3">
</asp:TextBox></td>
</tr>
<tr>
<td>
Education:
</td>
<td>
<asp:Label ID="LabelEducation" Text='<%# Bind( "LevelDesc") %>' runat="server"></asp:Label></td>
</tr>
<tr>
<td>
Experience:
</td>
<td>
<asp:Label ID="LabelExperience" Text='<%# Bind( "BurdenRate") %>' runat="server"></asp:Label></td>
</tr>
</table>
</td>
<td style="height: 248px; vertical-align: top; text-align: left;">
<table id="Table7" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
<tr>
<td style="width: 600px">
Notes:
</td>
</tr>
<tr>
<td >
<telerik:RadEditor ID="RadEditorNotes" runat="server" Height="411px" Width="333px">
<Content>
</
Content>
</telerik:RadEditor>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" colspan="1" style="vertical-align: top; text-align: left">
<asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' BackColor="AliceBlue" OnClick="btnUpdate_Click">
</asp:Button></td>
<td align="right" colspan="2" style="vertical-align: top; text-align: left">
<
asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName
="Cancel" BackColor="AliceBlue"></asp:Button>
</td>
</tr>
</table>
</FormTemplate>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<PopUpSettings Modal="True" />
<FormMainTableStyle Height="200px" Width="400px" />
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</ContentTemplate>
</asp:UpdatePanel>