Hi,
I have a RadGrid with ExportToExcel functionality. That works very well.
My problem:
When I filter the data by EndDate (data between two EndDates). Then clicking on ExportToExcel button gives error "The string was not recognized as a valid DateTime."
Here's my markup:
01.<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">02. <script type="text/javascript">03. function requestStart(sender, args) {04. if (args.get_eventTarget().indexOf("DownloadPDF") > 0 || args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)05. args.set_enableAjax(false);06. }07. </script>08. <telerik:radgrid id="grdView" runat="server" skinid="grdViewSkin" autogeneratecolumns="False"09. cellspacing="0" gridlines="None" showgrouppanel="true" allowmultirowselection="true"10. onneeddatasource="grdView_NeedDataSource">11. <MasterTableView HierarchyLoadMode="ServerOnDemand" HierarchyDefaultExpanded="false" DataKeyNames="ID" >12. <Columns>13. <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID" HeaderText="ID" UniqueName="ID"></telerik:GridBoundColumn>14. <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name" HeaderText="Name" UniqueName="Name" ></telerik:GridBoundColumn>15. <telerik:GridDateTimeColumn DataField="StartDate" DataFormatString="{0:MM/dd/yy}" DataType="System.DateTime"16. FilterControlAltText="Filter StartDate" HeaderText="StartDate" UniqueName="StartDate"></telerik:GridDateTimeColumn>17. <telerik:GridDateTimeColumn DataField="EndDate" DataFormatString="{0:MM/dd/yy}" DataType="System.DateTime" HeaderText="EndDate" UniqueName="EndDate">18. <FilterTemplate>19. <telerik:RadDatePicker ID="dateFrom" runat="server" >20. <ClientEvents OnDateSelected="FromDateSelected" />21. </telerik:RadDatePicker>22. To23. <telerik:RadDatePicker ID="dateTo" runat="server" Width="30px">24. <ClientEvents OnDateSelected="ToDateSelected" />25. </telerik:RadDatePicker> 26. <telerik:RadScriptBlock ID="scriptFilterEventDate" runat="server">27. <script type="text/javascript">28. function FromDateSelected(sender, args) {29. var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");30. var ToPicker = $find('<%# ((GridItem)Container).FindControl("dateTo").ClientID %>');31. 32. var fromDate = FormatSelectedDate(sender);33. var toDate = FormatSelectedDate(ToPicker);34. 35. if (toDate != '') {36. tableView.filter("ContractEndDate", fromDate + " " + toDate, "Between");37. }38. }39. 40. function ToDateSelected(sender, args) {41. var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");42. var FromPicker = $find('<%# ((GridItem)Container).FindControl("dateFrom").ClientID %>');43. 44. var fromDate = FormatSelectedDate(FromPicker);45. var toDate = FormatSelectedDate(sender);46. 47. if (fromDate != '') {48. tableView.filter("ContractEndDate", fromDate + " " + toDate, "Between");49. }50. }51. 52. function FormatSelectedDate(picker) {53. var date = picker.get_selectedDate();54. var dateInput = picker.get_dateInput();55. var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());56. 57. return formattedDate;58. } 59. </script>60. </telerik:RadScriptBlock>61. </FilterTemplate>62. </telerik:GridDateTimeColumn> 63. </Columns>64. </MasterTableView> 65. </telerik:radgrid>66.</asp:Content>
Is there something I'm missing?
Hi,
I have a radPivotGrid, when i am running it on my local pc and on web server it is working fine.
But on mobile and some other device it is showing grid on half page.
Hello, I have an issue with radgrid static headers runing on IE compatibility mode, any solution?
<telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" runat="server"> <ClientSettings> <Scrolling AllowScroll="true" ScrollHeight="500" UseStaticHeaders="true" /> </ClientSettings> <MasterTableView TableLayout="Fixed" runat="server"> <GroupByExpressions> <telerik:GridGroupByExpression> <GroupByFields> <telerik:GridGroupByField FieldName="IdProvincia" /> </GroupByFields> <SelectFields> <telerik:GridGroupByField FieldName="Provincia" /> </SelectFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridBoundColumn DataField="Airport" HeaderText="Provincia" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LAT" HeaderText="LAT" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LNG" HeaderText="LNG" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LAT" HeaderText="LAT" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LNG" HeaderText="LNG" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn> </Columns> </MasterTableView></telerik:RadGrid>
I think I'm missing something obvious, but I surrender. I have an editor with the image manager tool enabled. Below is my code behind code setting it all up, you can see that I create the directory if it is not there. The image uploads successfully and is in the right directory. However I am getting these three errors
Any hints would be greatly appreciated.
'set imagemanager pathsDim sImage As String = SSG.BYOC.Shared.Resource.GetClassroomSaveToFilePath(AppConfig.ClassroomFileUploadRoot, ClassID)Dim sImagePath As String = Server.MapPath(sImage)Dim imagePath As String() = New String() {sImage}' Dim imageFilters As String() = New String() {"gif", "jpg", "jpeg", "png"}If Directory.Exists(sImagePath) = False Then Directory.CreateDirectory(sImagePath)End If'ctlDescription.ImageManager.SearchPatterns = imageFiltersctlDescription.ImageManager.ViewPaths = imagePathctlDescription.ImageManager.UploadPaths = imagePathctlDescription.ImageManager.DeletePaths = imagePath
when creating groups dynamically to a grid with template columns, the application is throwing an unhandled exception error if the groupbe by column holds null values. If the underlying data source is modified to replace null values with "" then the grid functions fine. The way its to behave the columns to be grouped by can change so I need a way to handle nulls in the application code. Does anyone have a solution for this?
Dim ex As New GridGroupByExpression()
For Each dRow As DataRow In objDS.Tables(2).Rows
Dim field1 As New GridGroupByField()
field1.FieldName = dRow("Column_Name")
field1.HeaderText = dRow("display_name")
field1.SortOrder = dRow("Sort_Order")
ex.GroupByFields.Add(field1)
ex.SelectFields.Add(field1)
Next
EditGrid.MasterTableView.GroupByExpressions.Add(ex)
I've searched the forums with no luck.
What I need to do is send an email with the ID of the newly inserted items ID that is generated from SQL(isIdentity)
I was assuming that I could get this info from RadGrid1_ItemInserted but no luck.
Dim editformItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
Dim test As String = editformItem.Item("Task_Id").Text
-DataKeyNames="Task_Id"
I need the id of the inserted item.
Can someone please help.
Thank you

hi
I have an item "Billing & Orders" in the item text and is giving me an error that is caused by "&". When i changed to "Billing and Orders", it works fine. Is there a way to have an "&" in the item text instead of "and"? Thanks a lot.