Hi telerik
I have to dinamicy add new row to radgrid without postback and i want to access values of rows (radgrid) in code behind .
How can i immpement it ?
please help me

In my RadGrid, if I set EditMode="EditForms", the checkmark and x for update and cancel disappear and get replaced with text. However, if I set EditMode="InPlace", I get the icons. How can I get the icons with EditForms?
01.<telerik:RadGrid ID="rgPackagesHistory" AllowSorting="true" GridLines="Horizontal" AllowAutomaticDeletes="false"02. AllowAutomaticInserts="false" AllowAutomaticUpdates="false" runat="server" PageSize="10"03. AllowPaging="true" AllowFilteringByColumn="false" ShowStatusBar="true" AllowMultiRowSelection="true"04. OnItemCommand="rgPackagesHistory_ItemCommand" OnItemDataBound="rgPackagesHistory_ItemDataBound"05. OnUpdateCommand="rgPackagesHistory_UpdateCommand" OnDeleteCommand="rgPackagesHistory_DeleteCommand">06. <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />07. <MasterTableView Width="100%" CommandItemDisplay="None" DataKeyNames="Package_ID" HorizontalAlign="Center"08. AutoGenerateColumns="False" EditMode="EditForms">09. <CommandItemSettings />10. <NestedViewTemplate>11. <b>Any other benefits:</b> <%# Eval("Package_AnyOtherBenefit") %><br />12. <b>Comments:</b> <%# Eval("Package_Comments") %><br />13. </NestedViewTemplate>14. <Columns>15. <telerik:GridNumericColumn DataField="Package_MinAge" UniqueName="Package_MinAge" ReadOnly="false" MaxValue="255" />16. <telerik:GridNumericColumn DataField="Package_MaxAge" UniqueName="Package_MaxAge" ReadOnly="false" MaxValue="255" />17. <telerik:GridBoundColumn DataField="Package_DownPayment" UniqueName="Package_DownPayment" ReadOnly="false" MaxLength="50" />18. <telerik:GridBoundColumn DataField="Package_AdminFees" UniqueName="Package_AdminFees" ReadOnly="false" MaxLength="50" />19. <telerik:GridBoundColumn DataField="Package_InterestRate" UniqueName="Package_InterestRate" ReadOnly="false" MaxLength="50" />20. <telerik:GridBoundColumn DataField="Package_InsuranceRate" UniqueName="Package_InsuranceRate" ReadOnly="false" MaxLength="50" />21. <telerik:GridNumericColumn DataField="Package_MaxPeriod" UniqueName="Package_MaxPeriod" ReadOnly="false" MaxValue="255" />22. <telerik:GridBoundColumn DataField="Package_BaloonPayment" UniqueName="Package_BaloonPayment" ReadOnly="false" MaxLength="50" />23. <telerik:GridBoundColumn DataField="Package_AnyOtherBenefit" UniqueName="Package_AnyOtherBenefit" ReadOnly="false" MaxLength="50" Visible="false" />24. <telerik:GridBoundColumn DataField="Package_Comments" UniqueName="Package_Comments" ReadOnly="false" MaxLength="200" Visible="false" />25. <telerik:GridDateTimeColumn DataField="Package_Date" UniqueName="Package_Date" DataFormatString="{0: dd/MM/yyyy}" ReadOnly="true" />26. <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"27. ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-CssClass="MyImageButton" />28. <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete"29. EditFormColumnIndex="1" UniqueName="column1abc" ConfirmDialogType="RadWindow"30. ShowInEditForm="false" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-CssClass="MyImageButton" />31. </Columns>32. <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="True" />33. <PagerStyle AlwaysVisible="True" />34. </MasterTableView>35. <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />36. <ClientSettings EnableRowHoverStyle="true">37. <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />38. <KeyboardNavigationSettings EnableKeyboardShortcuts="true" />39. </ClientSettings>40.</telerik:RadGrid>
I have an EntityDataSource
<asp:EntityDataSource ID="InventoryEntityDataSource" runat="server" ConnectionString="name=myEntities" DefaultContainerName="myEntities" EnableFlattening="False" EntitySetName="Inventory" Select="it.[InventoryID], it.[InventorySalesRepUserID], it.[SalesRep_Table].[DisplayName] AS SalesRep_DisplayName, " EntityTypeFilter="" OrderBy="it.[InventoryID]"></asp:EntityDataSource>And RadGrid
<telerik:RadGrid ID="InventoryRadGrid" runat="server" AutoGenerateColumns="False" DataSourceID="InventoryEntityDataSource" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" ShowGroupPanel="True" Width="100%" ShowFooter="True" GroupPanelPosition="Top" ResolveRenderMode="Classic" CellSpacing="-1" GridLines="Both"> <PagerStyle Mode="NextPrevAndNumeric" /> <GroupingSettings CaseSensitive="false" /> <MasterTableView DataSourceID="InventoryEntityDataSource" DataKeyNames="InventoryID" EnableViewState="true" TableLayout="Fixed"> <Columns> <telerik:GridTemplateColumn DataField="InventoryID" SortExpression="InventoryID" DataType="System.Int32" FilterControlAltText="Filter InventoryID column" HeaderText="Item #" UniqueName="InventoryID" Visible="False"> <ItemTemplate> <asp:HyperLink ID="HyperLink1jkl" runat="server" Text='<%# Eval("InventoryID") %>' </asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="InventorySalesRepUserID" FilterControlAltText="Filter InventorySalesRepUserID column" HeaderText="Sales Rep ID" UniqueName="InventorySalesRepUserID" Visible="False" SortExpression="InventorySalesRepUserID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SalesRep_DisplayName" FilterControlAltText="Filter InventorySalesRepUserName column" HeaderText="Sales Rep Name" UniqueName="InventorySalesRepUserName" Visible="False" SortExpression="SalesRep_DisplayName"> </telerik:GridBoundColumn> </Columns> </MasterTableView></telerik:RadGrid>It loads fine and filter on radgrid also works fine when filtering InventoryID and SalesRepID but when i filter for SalesRep_DisplayName give me an error.
'SalesRep_DisplayName' is not a member of type 'myDB_Model.tblInventory' in the currently loaded schemas. Near simple identifier.

Partial Class Testing_Upload Inherits System.Web.UI.Page Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest If e.Argument = "Goback" Then Call SaveData() End If End Sub Protected Sub btnSaveServiceCall_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveServiceCall.Click MsgBox(RadAsyncUpload1.UploadedFiles.Count.ToString + " COUNT IS CORRECT") If validateServiceCallRequirements() = True Then Call SaveData() End If End Sub Protected Function validateServiceCallRequirements() As Boolean RadWindowManager.RadConfirm("My message", "GoTo", 250, 110, Nothing, "Confirm", "") Return False Exit Function End Function Protected Sub SaveData() MsgBox(RadAsyncUpload1.UploadedFiles.Count.ToString + " COUNT IS INCORRECT") End Sub Protected Sub Testing_Upload_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then End If End SubEnd Class<%@ Page Language="VB" MasterPageFile="~/InductoServMasterPage.master" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Testing_Upload" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" > <AjaxSettings> </AjaxSettings> </telerik:RadAjaxManager> <asp:UpdatePanel ID="UpdatePanelServiceCallRequirements" runat ="server" EnableViewState ="true" UpdateMode ="Conditional"> <ContentTemplate > <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" skin="Windows7" Font-Names ="Arial" Font-Size ="14px" PostbackTriggers ="btnSaveServiceCall" MultipleFileSelection ="Automatic" Width ="300px" AllowedFileExtensions =".jpg,.png,.jpeg,.gif,.bmp,.doc,.docx,.xls,.xlsx,.txt,.pdf,.ppt,.pptx,.pps,.ppsx,.pot,.potx" Localization-Select="Browse"> </telerik:RadAsyncUpload> <asp:Button id="btnSaveServiceCall" runat="server" Text="Save" UseSubmitBehavior="False" CssClass="btnCustom"></asp:Button> </ContentTemplate> </asp:UpdatePanel> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"></telerik:RadCodeBlock> <script type="text/javascript" language="javascript"> function GoTo(arg) { if (arg == true ) { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Goback"); } } </script> <telerik:RadWindowManager ID="RadWindowManager" runat="server"> <AlertTemplate > <div> <div class="rwDialogPopup radalert" style="padding-left: 0; font-family :Arial ; font-size :14px ; background: url('../Images/icon/Information.png') no-repeat left center !important;"> <div class="rwDialogText" style="margin-left: 50px; "> {1} </div> <div style="margin-left: 50px; "> <a onclick="$find('{0}').close();" class="rwPopupButton" href="javascript:void(0);"> <span class="rwOuterSpan"> <span class="rwInnerSpan">##LOC[OK]## </span> </span> </a> </div> </div> </div> </AlertTemplate> <ConfirmTemplate> <div class="rwDialogPopup radconfirm" style =" font-family :Arial ; font-size :14px ; background: url('../Images/icon/Question.png') no-repeat left center !important; "> <div class="rwDialogText" > {1} </div> <div> <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);"> <span class="rwOuterSpan"> <span class="rwInnerSpan">Yes</span> </span></a> <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);"> <span class="rwOuterSpan"> <span class="rwInnerSpan">No</span></span> </a> </div> </div> </ConfirmTemplate> </telerik:RadWindowManager> </asp:Content>
I have the following two columns
<telerik:GridTemplateColumn HeaderText="Year" UniqueName="Year" Visible="False" Display="False"> <EditItemTemplate> <asp:dropdownlist runat="server" id="ddlYear" appenddatabounditems="True"> <asp:ListItem Text="-- Select Year --" Value="" /> </asp:dropdownlist> <asp:requiredfieldvalidator ... /> </EditItemTemplate></telerik:GridTemplateColumn><telerik:GridTemplateColumn HeaderText="Fund" UniqueName="Fund" Visible="False"> <EditItemTemplate> <asp:listbox runat="server" id="lbFund" selectionmode="Multiple" /> <asp:requiredfieldvalidator ... /> </EditItemTemplate></telerik:GridTemplateColumn>And here's the HTML output
<tr> <td> <label for="..._ddlReportPeriod">Budget Year:</label> <!--LABEL--> </td> <td id="..."> <select name="...> <option value="">-- Select Year --</option> ... </select></td></tr><tr> <td> Fund Source: <!--NOT A LABEL--> </td> <td id="..."> <select size="4" ...> <option ...></option> ... </select></td></tr><tr>How come in the first case, I get a <label> tag, but in the 2nd case I don't? Is there a way to fix this?
I trimmed the code as much as I could to make it readable.I upgraded a .NET web application from .NET framework 2.0 to .NET framework 4.5. The Telerik controls were also upgraded, from Q3 2010 to Q3 2015. Due to the upgrade, the web application is experiencing some odd behavior which did not exist in the previous version. Mainly, the ItemCommand is not being raised at all on one of the grids. I have searched extensively and tried multiple solutions to no avail. I have included the relevant sections of code below. The source code is quite large and complex, so I won't be including all parts.
The command that should be firing, will result in filters being displayed. The radgrid contains a radtoolbar which contains a radtollbarbutton, when the button is clicked, I am expecting the item command event to be raised and the filter dialog to be displayed.
Master Page
</head><body> <form id="form1" runat="server" style="height: 100%;"> <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"> <StyleSheets> <telerik:StyleSheetReference Name="TelerikCustomSkins.Grid.Custom.css" Assembly="TelerikCustomSkins"/> <telerik:StyleSheetReference Name="TelerikCustomSkins.Input.Custom.css" Assembly="TelerikCustomSkins"/> <telerik:StyleSheetReference Name="TelerikCustomSkins.Menu.Custom.css" Assembly="TelerikCustomSkins"/> <telerik:StyleSheetReference Name="TelerikCustomSkins.Calendar.Custom.css" Assembly="TelerikCustomSkins"/> <telerik:StyleSheetReference Name="TelerikCustomSkins.ComboBox.Custom.css" Assembly="TelerikCustomSkins"/> </StyleSheets> </telerik:RadStyleSheetManager> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="dgFolders"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="dgFolders" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> <telerik:AjaxUpdatedControl ControlID="actionToolBar" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="dgDocuments"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="dgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> <telerik:AjaxUpdatedControl ControlID="actionToolBar" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="asgDocuments"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="asgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> <telerik:AjaxUpdatedControl ControlID="actionToolBar" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadWindowManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="actionToolBar"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="actionToolBar" /> <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> <ClientEvents OnRequestStart="RequestStart" /> </telerik:RadAjaxManager> <div id="MasterDIV" runat="server" style="width: 100%; height: 97%;"> <div style="display: none; width: 0px; height: 0px;"> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableViewState="false"> <Windows> <telerik:RadWindow Behaviors="close, move, resize" runat="server" ID="rwAboutWindow" ReloadOnShow="true" Height="450px" Width="680px" NavigateUrl="~/About.aspx" Modal="true" VisibleStatusbar="false" ShowContentDuringLoad="false" Overlay="true" SkinID="TelerikRadWindow" /> </Windows> </telerik:RadWindowManager> </div> <table id="tblMain" width="100%" border="0" cellspacing="0px;" cellpadding="0px;"> <tr id="trHeader" class="MasterHeader"> <td> <div style="float: right; padding-right: 15px; padding-top: 10px;"> <asp:Label ID="lblUserId" runat="server" CssClass="LoginNameDiv"></asp:Label> </div> <asp:Image ID="imgApplicationLogo" runat="server" SkinID="ApplicationLogoImage" /> <asp:Image ID="imgApplicationLogoTest" runat="server" SkinID="ApplicationLogoImageTest" Visible="false" /> <asp:Image ID="imgApplicationLogoDev" runat="server" SkinID="ApplicationLogoImageDev" Visible="false" /> </td> </tr> <tr> <td style="padding-left: 0px; padding-right: 0px;"> <div class="SearchBar" style="width:100%;height:100%;"> <table id="Table2" class="MasterTableButtons" border="0" style="width:100%;height:100%;" cellspacing="0px;" cellpadding="0px;"> <tr> <td> <uc1:ActionBar ID="ActionBar" runat="server" /> </td> </tr> </table> </div> </td> </tr> </table> <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal" HeightOffset="97" VisibleDuringInit="false"> <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" CssClass="MasterDiv"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </telerik:RadPane> </telerik:RadSplitter> </div> <div id="Div1" runat="server" style="width: 100%;"> <table id="Table1" width="100%" cellspacing="1"> <tr id="trFooterErrorSummary"> <td class="MasterFooterErrors"> <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please correct the following:" /> </td> </tr> <tr id="trFooterSiteMap" class="MasterFooterSiteMap"> <td> </td> </tr> <!--Close Footer Row--> </table> </div> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" SkinID="TelerikRadAjaxLoadingPanel" /> </form></body></html>Default Page
<asp:Content ID="PlaceHolder" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <telerik:RadSplitter ID="rsMain" runat="server" Width="100%" SkinID="TelerikRadSplitter" VisibleDuringInit="false" HeightOffset="50" Orientation="horizontal"> <telerik:RadPane ID="rpLeftPane" runat="server" Scrolling="None" Height="30px"> <telerik:RadTabStrip ID="TabStrip" runat="server" SkinID="TelerikRadTabStrip" SelectedIndex="0" UnSelectChildren="True" ClickSelectedTab="True" AutoPostBack="True" Width="100%" MultiPageID="MultiPage" ScrollChildren="true" ScrollButtonsPosition="middle"> <Tabs> <telerik:RadTab runat="server" Selected="True" Text="Find" PageViewID="RadPageView0" ImageUrl="~/images/search.gif" /> </Tabs> <TabTemplate> <asp:Label ID="lblTabName" runat="server"></asp:Label> <asp:ImageButton ID="ibtnRemoveTab" runat="server" ImageUrl="~/images/Tab_Close_Gray.png" OnClick="ibtnRemoveTab_Click" AlternateText="Close Tab" /> </TabTemplate> </telerik:RadTabStrip> </telerik:RadPane> <telerik:RadPane ID="RadPane2" runat="server" Scrolling="None"> <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal" VisibleDuringInit="false"> <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" CssClass="MasterDiv"> <telerik:RadMultiPage ID="MultiPage" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" Height="100%"> <telerik:RadPageView ID="RadPageView0" runat="server" EnableViewState="true" Height="100%" Width="100%"> <telerik:RadMultiPage ID="SearchMultiPage" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" Height="100%"> <telerik:RadPageView ID="RadPageView3" runat="server" EnableViewState="true" Height="100%" Width="100%"> <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%" Orientation="Horizontal" SkinID="TelerikRadSplitter" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px" ResizeWithParentPane="false" VisibleDuringInit="false"> <telerik:RadPane ID="PaneSearch" runat="server" Height="280px" BackColor="#E8F1F8"> <uc1:FolderSearchControl ID="FolderSearchControl1" runat="server" /> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar1" CollapseMode="Both" runat="server" /> <telerik:RadPane ID="PaneFolderGrid" runat="server" Height="100%" Scrolling="None"> <uc1:FolderGridControl ID="FolderGridControl1" runat="server" /> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView4" runat="server" EnableViewState="true" Height="100%" Width="100%"> <telerik:RadSplitter ID="Splitter0" runat="server" Height="100%" Width="100%" Orientation="Horizontal" SkinID="TelerikRadSplitter" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px" ResizeWithParentPane="false" VisibleDuringInit="false"> <telerik:RadPane ID="PaneAdvSearch" runat="server" Height="100%" BackColor="#E8F1F8"> <uc1:AdvDocumentSearchControl ID="AdvDocumentSearchControl" runat="server" /> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar3" CollapseMode="Both" runat="server" /> <telerik:RadPane ID="PaneAdvSearchGrid" runat="server" Scrolling="None"> <uc1:AdvSearchGridControl ID="AdvSearchGridControl" runat="server" /> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPageView> </telerik:RadMultiPage> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView1" runat="server" EnableViewState="true" Height="100%" Width="100%"> <telerik:RadSplitter ID="Splitter1" runat="server" Orientation="Horizontal" SkinID="TelerikRadSplitter" Height="100%" Width="100%" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px" VisibleDuringInit="false" ResizeWithParentPane="true"> <telerik:RadPane ID="PaneDocumentHeader" runat="server" Height="130px" Width="100%" BackColor="#E8F1F8" Scrolling="None"> <telerik:RadComboBox ID="DocumentRCB" Visible="false" AutoPostBack="true" runat="server" AppendDataBoundItems="true" HighlightTemplatedItems="true" MarkFirstMatch="true" OnSelectedIndexChanged="DocumentRCB_SelectedIndexChanged" OnDataBound="DocumentRCB_DataBound" SkinID="TelerikRadComboBox" Width="100%" RenderMode="Lightweight"> <HeaderTemplate> <ul> <li class="comboBoxCol1"> <asp:LinkButton runat="server" ToolTip="Sort By Document Title" ID="docTitle" OnClick="docTitle_click" OnPreRender="docTitle_PreRender" Text="Document Title" CssClass="comboBoxColUnsorted" EnableViewState="false" /></li> <li class="comboBoxCol2"> <asp:LinkButton runat="server" ToolTip="Sort By Retirement System" ID="retSystem" OnClick="retSystem_click" OnPreRender="retSystem_PreRender" Text="Retirement System" CssClass="comboBoxColUnsorted" EnableViewState="false" /></li> <li class="comboBoxCol3"> <asp:LinkButton runat="server" ToolTip="Sort By Document Status" ID="docStatus" OnClick="docStatus_click" OnPreRender="docStatus_PreRender" Text="Document Status" CssClass="comboBoxColUnsorted" EnableViewState="false" /> </li> <li class="comboBoxCol4"> <asp:LinkButton runat="server" ToolTip="Sort By Document Date" ID="docDate" OnClick="docDate_click" OnPreRender="docDate_PreRender" Text="Document Date" CssClass="comboBoxColUnsorted" EnableViewState="false" /> </li> <li class="comboBoxCol5"> <asp:LinkButton runat="server" ToolTip="Sort By Received Date" ID="recDate" OnClick="recDate_click" OnPreRender="recDate_PreRender" Text="Received Date" CssClass="comboBoxColUnsorted" EnableViewState="false" /> </li> <li class="comboBoxCol6"> <asp:LinkButton runat="server" ToolTip="Sort By Capture Source" ID="captureSource" OnClick="captureSource_click" OnPreRender="captureSource_PreRender" Text="Capture Source" CssClass="comboBoxColUnsorted" EnableViewState="false" /> </li> </ul> </HeaderTemplate> <ItemTemplate> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "<strong>Select one</strong>", "<ul><li class='comboBoxCol1'>" & DataBinder.Eval(Container.DataItem, "DocumentTitle") & "</li>")%> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol2'>" & DataBinder.Eval(Container.DataItem, "RetirementSystem") & "</li>")%> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol3'>" & DataBinder.Eval(Container.DataItem, "DocumentStatus") & "</li>")%> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol4'>" & DataBinder.Eval(Container.DataItem, "DocumentDate").ToString().Split().GetValue(0) & "</li>")%> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol5'>" & DataBinder.Eval(Container.DataItem, "ReceivedDate").ToString().Split().GetValue(0) & "</li>")%> <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol6'>" & DataBinder.Eval(Container.DataItem, "CaptureSource").ToString() & "</li></ul>")%> </ItemTemplate> <FooterTemplate> <strong>A total of <asp:Literal runat="server" ID="RadComboItemsCount" /> document(s)</strong> </FooterTemplate> </telerik:RadComboBox> <telerik:RadSplitter ID="SplitterDocumentHeader" runat="server" SkinID="TelerikRadSplitter" Orientation="Vertical" Height="100%" Width="100%" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px" VisibleDuringInit="false"> <telerik:RadPane ID="PaneUserInfo" runat="server" Height="100%" Width="100%"> <uc1:UserInfoControl ID="UserInfoControl1" runat="server" /> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar5" runat="server" /> <telerik:RadPane ID="PaneRelatedEntities" runat="server" Height="100%" Width="100%" Scrolling="None"> <uc1:RelatedEntities ID="RelatedEntities1" runat="server" /> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar4" CollapseMode="Both" runat="server" /> <telerik:RadPane ID="PaneDocumentGrid" runat="server" Height="100%" Scrolling="None"> <uc1:DocumentGridControl ID="DocumentGridControl1" runat="server" /> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView2" runat="server" EnableViewState="true" Height="100%" Width="100%"> <uc1:DocumentViewer ID="DocumentViewer1" runat="server" /> </telerik:RadPageView> </telerik:RadMultiPage> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter></asp:Content>Folder Grid Control
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadFilter1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadFilter1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ApplyButton"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="dgFolders" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy><div style="display: none; width: 0px; height: 0px;"> <telerik:RadWindow ID="rwFilter" runat="server" Behaviors="Move,Close,Resize" Title="Advanced Filter" Modal="true" Width="600" Height="350" SkinID="TelerikRadWindow"> <ContentTemplate> <telerik:RadFilter RegisterWithScriptManager="true" runat="server" ID="RadFilter1" FilterContainerID="dgFolders" ShowApplyButton="false" OnApplyExpressions="rwFilter_OnApplyExpressions" Style="margin: 10px 0 0 10px" SkinID="TelerikRadFilter" ExpressionPreviewPosition="Top" /> <asp:Panel ID="FilterButtonPanel" runat="server" Style="margin: 10px 0 0 10px; font-size: medium"> <asp:Button runat="server" ID="ApplyButton" OnClick="ApplyButton_Click" Text="Apply Expressions" OnClientClick="hideFilterBuilderDialog()" /> <asp:Button runat="server" ID="CancelButton" Text="Cancel" OnClientClick="hideFilterBuilderDialog(); return false;" /> </asp:Panel> </ContentTemplate> </telerik:RadWindow> <%-- Add this invisible RadDatePicker to get the calendar css to load. --%> <telerik:RadDatePicker SkinID="TelerikRadDatePicker" ID="RadDatePicker1" runat="server" /></div><cc1:CommonRadGrid ID="dgFolders" runat="server" AutoGenerateColumns="False" SkinID="TelerikRadGrid" AllowSorting="True" AllowPaging="True" Height="100%" GridLines="None" EnableEmbeddedSkins="False" EnableLinqExpressions="False"> <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" ReorderColumnsOnClient="true" Resizing-AllowColumnResize="true" Resizing-EnableRealTimeResize="true"> <Selecting AllowRowSelect="True" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> <Resizing ClipCellContentOnResize="False" AllowColumnResize="true"/> <ClientEvents OnFilterMenuShowing="filterMenuShowing"/> </ClientSettings> <FilterMenu OnClientShown="MenuShowing" /> <GroupingSettings CaseSensitive="False" /> <SelectedItemStyle Wrap="False" /> <FilterItemStyle Wrap="False" /> <AlternatingItemStyle Wrap="False" /> <ItemStyle Wrap="False" /> <PagerStyle AlwaysVisible="True" PagerTextFormat="{4} Displaying page {0} of {1}, items {2} to {3} of {5}. " Mode="NextPrevNumericAndAdvanced" /> <MasterTableView Width="1110px" CommandItemDisplay="Top"> <CommandItemTemplate> <telerik:RadToolBar ID="RadToolBar1" runat="server" OnButtonClick="RadToolBar1_ButtonClick" SkinID="TelerikRadToolBar" OnClientButtonClicking="onPanelBarItemClicked" OnPreRender="RadToolBar1_PreRender"> <Items> <telerik:RadToolBarButton PostBack="true" Text="Toggle Filters" CheckOnClick="true" CommandName="ToggleFilter" ImageUrl="~/App_Themes/Custom/Grid/Filter.gif"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Text="Advanced Filter" CommandName="OpenRadFilter" ImageUrl="~/App_Themes/Custom/Grid/Filter.gif"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Text="Clear Filters" CommandName="ShowAll" ImageUrl="~/App_Themes/Custom/Grid/Cancel.gif" Visible='<%# Not String.IsNullOrEmpty(dgFolders.MasterTableView.FilterExpression) %>'> </telerik:RadToolBarButton> </Items> </telerik:RadToolBar> </CommandItemTemplate> <Columns> <telerik:GridButtonColumn DataTextField="Id" SortExpression="Id" HeaderText="Id" Groupable="False" HeaderButtonType="TextButton" CommandName="OpenCommand" UniqueName="IdLink" DataType="System.Int32"> <headerstyle width="110px" /> </telerik:GridButtonColumn> <telerik:GridBoundColumn Display="False" UniqueName="Id" DataField="Id" SortExpression="Id" Groupable="False" HeaderText="Id" HeaderButtonType="TextButton" ReadOnly="True" DataType="System.Int32" visible="False"> <headerstyle width="60px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="DecryptedSSN" SortExpression="DecryptedSSN" HeaderText="DecryptedSSN" HeaderButtonType="TextButton" UniqueName="DecryptedSSN" Groupable="False" ReadOnly="True" Visible="False"> <headerstyle width="110px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" UniqueName="TypeToString" DataField="TypeToString" SortExpression="TypeToString" HeaderText="Entity Type" HeaderButtonType="TextButton" Groupable="False" ReadOnly="True"> <headerstyle width="110px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="Name" SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton" UniqueName="Name" ReadOnly="True" Groupable="False" FilterControlWidth="190px"> <headerstyle width="220px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="MaskedSSN" SortExpression="SSN" HeaderText="SSN" Groupable="False" HeaderButtonType="TextButton" UniqueName="SSN" ReadOnly="True"> <headerstyle width="110px" /> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn FilterControlWidth="100px" DataField="DOB" HeaderText="DOB" Groupable="False" SortExpression="DOB" UniqueName="DOB" DataFormatString="{0:d}" DataType="System.DateTime" Display="False" MinDate="1800-01-01"> <headerstyle width="130px" /> </telerik:GridDateTimeColumn> <telerik:GridBoundColumn Display="False" DataField="Address" SortExpression="Address" Groupable="False" HeaderText="Address" HeaderButtonType="TextButton" UniqueName="Address" ReadOnly="True" FilterControlWidth="200px"> <headerstyle width="250px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="Number" SortExpression="Number" Groupable="False" HeaderText="Code" HeaderButtonType="TextButton" UniqueName="Number" ReadOnly="True"> <filtertemplate> <telerik:RadComboBox MarkFirstMatch="true" ID="Number" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="RadComboBoxFilter_SelectedIndexChanged"> <Items> <telerik:RadComboBoxItem Text="" /> </Items> </telerik:RadComboBox> </filtertemplate> <headerstyle width="110px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="CountDesc" SortExpression="CountDesc" Groupable="False" HeaderText="County" HeaderButtonType="TextButton" UniqueName="CountDesc" ReadOnly="True"> <filtertemplate> <telerik:RadComboBox DropDownWidth="120" MarkFirstMatch="true" ID="CountDesc" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="RadComboBoxFilter_SelectedIndexChanged"> <Items> <telerik:RadComboBoxItem Text="" /> </Items> </telerik:RadComboBox> </filtertemplate> <headerstyle width="110px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Display="False" DataField="Description" SortExpression="Description" Groupable="False" HeaderText="Description" HeaderButtonType="TextButton" UniqueName="Description" FilterControlWidth="250px" ReadOnly="True"> <headerstyle width="300px" /> </telerik:GridBoundColumn> <%--<telerik:GridBoundColumn HeaderText=" " UniqueName="EmptyFiller" AllowFiltering="False" Groupable="False" AllowSorting="False" DataFormatString=" " />--%> </Columns> </MasterTableView></cc1:CommonRadGrid>Hi,
I am using two DateTime Picker (set to BOTH Date&Time) and when I am trying to retrieve data from database, it is throwing an exception. From event viewer, I got this :
Stack trace: at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)
at Telerik.Web.UI.Calendar.Utils.Utility.ConvertToServerDateTimeCollection(DateTimeCollection dateTimeCollection, String inputString) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Calendar\Utility\Utility.cs:line 274
at Telerik.Web.UI.RadCalendar.LoadPostData(String postDataKey, NameValueCollection postCollection) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Calendar\RadCalendar.cs:line 5041
at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Common\RadWebControl.cs:line 742
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I tried Debugging into Telerik Source, and I found that the exception is coming in this funtion:
/// <summary>
/// Converts an input 2D JavaScript array like [[5,10,2005],[6,10,2005],[7,10,2005]] into a DateTimeCollection.
/// </summary>
/// <param name="dateTimeCollection">The DateTimeCollection that will be filled.</param>
/// <param name="inputString">The input string.</param>
internal static void ConvertToServerDateTimeCollection(DateTimeCollection dateTimeCollection, string inputString)
{
int i, BracketCount = 0;
if (String.IsNullOrEmpty(inputString)) return;
for (i = 0; i < inputString.Length; i++)
{
if (inputString[i] == '[')
BracketCount++;
else if (inputString[i] == ']')
BracketCount--;
}
if (BracketCount != 0)
{
throw new FormatException(Constants.Exception.FormatInputJavaScriptDateException);
}
// Remove the "[" and the "]"
inputString = inputString.Replace("[", String.Empty).Replace("]", String.Empty);
string[] ArrDates = inputString.Split(",".ToCharArray());
for (i = 0; i < ArrDates.Length / 3; i++)
{
DateTime CurrentDateTime = new DateTime(Int32.Parse(ArrDates[i * 3]), Int32.Parse(ArrDates[i * 3 + 1]), Int32.Parse(ArrDates[i * 3 + 2]));
dateTimeCollection.Add(new RadDate(CurrentDateTime));
}
}
Please suggest some way to get rid from this problem.
Thanks
