<telerik:GridTemplateColumn HeaderText="Name M"
SortExpression="NameM" UniqueName="NameM"
EditFormColumnIndex="1">
<HeaderStyle Width="80px" />
<ItemTemplate>
<asp:Label runat="server" ID="lblName"
Text='<%# Eval("Name") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<uc1:TextboxMaster ID="TextboxMaster1" runat="server" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
The label shows the
correct value, but when i enter in editing mode it shows the control,
but it didnt works, when i click the button it looks like if an event ocurrs but the window doesnt display. Also if i add the control outside the grid it works
fine, what could be the problem??? ....
<EditFormSettings UserControlName="/Modules/TextboxMaster.ascx"
EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn2"></EditColumn>
</EditFormSettings>
but i've got the same problem<RadControl:RadGrid ID="RadGridUsers" runat="server" Skin="Default" Width="511px" Height="564px" BorderWidth="0" GridLines="None" AutoGenerateColumns="False" ShowGroupPanel="False" AllowPaging="False" AllowSorting="True" EnableEmbeddedSkins="false">
<ClientSettings ReorderColumnsOnClient="False" AllowDragToGroup="False" AllowColumnsReorder="False" Selecting-AllowRowSelect="true">
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
<Selecting AllowRowSelect="True"></Selecting>
<Resizing AllowRowResize="False" EnableRealTimeResize="False" ResizeGridOnColumnResize="False" AllowColumnResize="False"></Resizing>
<ClientEvents OnRowSelected="RadGrid_RowSelected" /></ClientSettings>
<MasterTableView DataKeyNames="UserProfileId,FidelityId" ClientDataKeyNames="UserProfileId,FidelityId" GroupLoadMode="Client" AllowMultiColumnSorting="False" AllowNaturalSort="false">
<SortExpressions>
<RadControl:GridSortExpression FieldName="LearningCenterId" SortOrder="Ascending" />
</SortExpressions>
<NoRecordsTemplate>
<div style="text-align: center; height: 300px">
<asp:Label ForeColor="RoyalBlue" Font-Size="14" runat="server" ID="Label1">There are no items to display</asp:Label>
<br />
</div>
</NoRecordsTemplate>
<Columns>
<RadControl:GridBoundColumn UniqueName="Name" SortExpression="Name" HeaderText="Employee Name" DataField="Name" ShowSortIcon="true">
<HeaderStyle Width="25%" Wrap="false" HorizontalAlign="left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
</RadControl:GridBoundColumn>
<RadControl:GridTemplateColumn UniqueName="Details" SortExpression="Details" HeaderText="Details" ShowSortIcon="false">
<HeaderStyle Width="50%" Wrap="false" HorizontalAlign="left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<asp:Label ID="lblGridDetails" runat="server" Text=" "></asp:Label>
</ItemTemplate>
</RadControl:GridTemplateColumn>
<RadControl:GridBoundColumn UniqueName="Title" SortExpression="Title" HeaderText="Title" DataField="Title" ShowSortIcon="true">
<HeaderStyle Width="25%" Wrap="false" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
</RadControl:GridBoundColumn>
</Columns>
</MasterTableView>
</RadControl:RadGrid>
| case "Export": |
| { |
| GridCommandItem item = e.Item as GridCommandItem; |
| CheckBox cbIgnorePaging = item.FindControl("cbIgnorePaging") as CheckBox; |
| RadComboBox rddlExport = item.FindControl("rddlExport") as RadComboBox; |
| rgDigitalCertificateAssignments.ExportSettings.OpenInNewWindow = true; |
| rgDigitalCertificateAssignments.ExportSettings.ExportOnlyData = true; |
| rgDigitalCertificateAssignments.ExportSettings.IgnorePaging = cbIgnorePaging.Checked; |
| rgDigitalCertificateAssignments.ExportSettings.FileName = "CertificateHistory"; |
| switch (rddlExport.SelectedValue) |
| { |
| case "excel": |
| { |
| rgDigitalCertificateAssignments.MasterTableView.GridLines = GridLines.Both; |
| rgDigitalCertificateAssignments.ExportSettings.Excel.Format = GridExcelExportFormat.Html; |
| rgDigitalCertificateAssignments.MasterTableView.ExportToExcel(); |
| break; |
| } |
| case "word": |
| { |
| rgDigitalCertificateAssignments.MasterTableView.ExportToWord(); |
| break; |
| } |
| case "csv": |
| { |
| rgDigitalCertificateAssignments.ExportSettings.Csv.ColumnDelimiter = GridCsvDelimiter.Tab; |
| rgDigitalCertificateAssignments.MasterTableView.ExportToCSV(); |
| break; |
| } |
| case "pdf": |
| { |
| rgDigitalCertificateAssignments.ExportSettings.Pdf.AllowAdd = false; |
| rgDigitalCertificateAssignments.ExportSettings.Pdf.AllowCopy = true; |
| rgDigitalCertificateAssignments.ExportSettings.Pdf.AllowModify = false; |
| rgDigitalCertificateAssignments.ExportSettings.Pdf.AllowPrinting = true; |
| rgDigitalCertificateAssignments.MasterTableView.ExportToPdf(); |
| break; |
| } |
| } |
| break; |
| } |
| } |
| <td style="width: 8px; height: 42px;"> |
| <telerik:RadDatePicker SelectedDate='<%# Bind("DOB") %>' |
| ID="tbBdate" runat="server" Culture="English (United States)" MinDate="1920-01-01"> |
| </telerik:RadDatePicker> |
| </td> |
| Specified cast is not valid. |
| Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. |
| Exception Details: System.InvalidCastException: Specified cast is not valid. |
| Source Error: |
| Line 97: DOB (if avail)</td> |
| Line 98: <td style="width: 8px; height: 42px;"> |
| Line 99: <telerik:RadDatePicker SelectedDate='<%# Bind("DOB") %>' |
| Line 100: ID="tbBdate" runat="server" Culture="English (United States)" MinDate="1920-01-01"> |
| Line 101: |
