or
function AccessOnclient() { var grid = $find("<%= radGrid.ClientID %>"); if (grid) { var EditItems = grid.get_editItems(); for (var i = 0; i < EditItems.length; i++) { var editItem = EditItems[0]; var dateTimePicker = $(editItem.get_editFormItem()).find("input[id*='StartDate']").get(0) var date = new Date; dateTimePicker.set_selectedDate(date); } } return false;<telerik:GridTemplateColumn HeaderText="Start Date" UniqueName="StartDate" DataField="StartDate" SortExpression="StartDate" FilterControlWidth="90px"> <ItemTemplate> <asp:Label runat="server" ID="lblStartDate" Text='<%# Eval("StartDate", "{0:g}") %>'> </asp:Label> </ItemTemplate> <InsertItemTemplate> <telerik:RadDateTimePicker ID="StartDate" MinDate="2013/1/1" runat="server" DbSelectedDate='<%# Bind("StartDate") %>'> </telerik:RadDateTimePicker> <asp:Button runat="server" id="btnGetDate" Text="Get Date" OnClientClick="return AccessOnclient()" /> <asp:RequiredFieldValidator ID="StartDateRequiredInsert" ControlToValidate="StartDate" runat="server" ErrorMessage="Required"></asp:RequiredFieldValidator> </InsertItemTemplate> <EditItemTemplate> <telerik:RadDateTimePicker ID="StartDate" MinDate="2013/1/1" runat="server" DbSelectedDate='<%# Bind("StartDate") %>'> </telerik:RadDateTimePicker> <asp:Button runat="server" id="btnGetDate" Text="Get Date" OnClientClick="return AccessOnclient()" /> <asp:RequiredFieldValidator ID="StartDateRequiredEdit" ControlToValidate="StartDate" runat="server" ErrorMessage="Required"></asp:RequiredFieldValidator> </EditItemTemplate> </telerik:GridTemplateColumn>Hello,
I am using Telerik RedGrid with it’s default skin in are application[.NET 4.0] to display the record and on the sorting, Searching , paging features as well but override the default colors of the grid item through coding in “itemdatabound “ event but when apply the sorting on the specific column of the grid then it alter the colors of this column to default skin in rest cases it is working fine.
Please see the attached screen shot it will clear little bit more about the problem what I am facing.
Please Response if any body facing this type problem and have solution.
Thanks In Advance!
<CommandItemTemplate> <table class="rgCommandTable" border="0" style="width:100%;"> <tr> <td style="text-align: left"> <asp:Panel ID="MakeLotDistribution" runat="server"> <asp:Button ID="MakeLotDistributionButton" runat="server" CausesValidation="False" title="Faire un lot de distribution" CommandName="InitInsert" class="rgAdd" OnClientClick="if (!checkIfSelected(this)) return;" /> <asp:LinkButton ID="MakeLotDistributionlien" runat="server" CausesValidation="False" Text="Faire un lot de distribution" CommandName="InitInsert" OnClientClick="return checkIfSelected(this);" /> </asp:Panel> </td> <td style="text-align: right"> <asp:Button ID="RefreshButton" runat="server" Text=" " title="Rafraîchir" class="rgRefresh" /> <asp:LinkButton ID="RebindGridButton" runat="server" CausesValidation="False" >Rafraîchir</asp:LinkButton> </td> </tr> </table></CommandItemTemplate>
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.protected override void OnInit(EventArgs e){ RadScriptManager.GetCurrent(this.Page).RegisterPostBackControl(this.DistributionItemGrid);}<div id="uploader"> <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Culture="zh-CN" EnableEmbeddedSkins="False" EnableInlineProgress="false" TemporaryFolder="~/Temp" Skin="Windows7" OnFileUploaded="RadAsyncUpload1_FileUploaded" AllowedFileExtensions="mp3,wav" MultipleFileSelection="Automatic"> </telerik:RadAsyncUpload> <asp:Button ID="Upload" runat="server" ClientIDMode="Static" Text="Upload" Enabled="true" /> <telerik:RadProgressManager ID="RadProgressManager1" runat="server" RefreshPeriod="10" /> <telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="true" EnableEmbeddedSkins="false" Skin="Windows7" Culture="zh-CN"> </telerik:RadProgressArea></div>protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e){ string filewebpath = "Upload/" + System.DateTime.Now.ToString("yyyy-MM-dd") + "/" + ddlWorkSegment.SelectedItem.Text; string filelocalpath = Server.MapPath("~/" + filewebpath); string fileduration = ""; MembershipUser u = Membership.GetUser(User.Identity.Name); // create|check target folder if (!System.IO.Directory.Exists(filelocalpath)) { try { System.IO.Directory.CreateDirectory(filelocalpath); } catch (Exception ex) { throw ex; } } foreach (UploadedFile uf in RadAsyncUpload1.UploadedFiles) { uf.SaveAs(filelocalpath + "\\" + uf.FileName.ToLower(), true); // here is codes for inserting file information into database } // refresh gridview to show file list gdvwFileList.DataSourceID = sqldsFileList.ID;}