Grid1.ExportSettings.Excel.FileExtension = "xlsx"''I want to export to .xml extension to avoid the window for the untrusted resource of the excel ''document.Grid1.ExportSettings.Excel.FileExtension = "xml"-- SCRIPTS OF PARENT PAGE function OpenPopup(currentVersion) { var widthVal = 750; var heightVal = 700; var oWnd = radopen("Components.aspx?v=" + currentVersion, "RadWindow1"); oWnd.setSize(heightVal, widthVal); //set a function to be called when RadWindow is closed oWnd.add_close(OnClientClose); return false; } function OnClientClose(oWnd) { //get the transferred arguments document.getElementById("btnSearchComponent").click(); } function CalledFn() { document.getElementById("btnSearchComponent").click(); } <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ReloadOnShow="true" ShowContentDuringLoad="false" Skin="Default" KeepInScreenBounds ="true" VisibleStatusbar="false" > <windows> <telerik:RadWindow runat="server" ID="RadWindow1" Width="800" Height="500" Behaviors="Move,Close" Modal="true" NavigateUrl="Components.aspx" AutoSize="false" OnClientClose="OnClientClose" > </telerik:RadWindow> </windows> </telerik:RadWindowManager> ON MY POP UP PAGE ( CHILD PAGE ) <script language="javascript" type="text/javascript"> function CloseForm() { window.opener.document.getElementById("btnSearchComponent").click(); } </script> <asp:Button runat="server" ID="btnAddProduct" Text="Add" CssClass="ButtonCSS" onclick="btnAddProduct_Click" Width="350px" /> CODE BEHIND TO CALL ABOVE FUNCTION AFTER PERFORMING CERTAIN TASKS AND TO STORE MY VALUES IN SESSION protected void btnAddProduct_Click(object sender, EventArgs e) { // I PERFORM CERTAIN TASKS HERE ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript", @"<script>CloseForm();</script>"); } <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CellSpacing="0" Culture="it-IT" DataSourceID="SqlDataSource1" GridLines="None"><MasterTableView AutoGenerateColumns="False" CommandItemDisplay="TopAndBottom" DataKeyNames="CustomerName" DataSourceID="SqlDataSource1"><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32" FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CustomerName" FilterControlAltText="Filter CustomerName column" HeaderText="CustomerName" ReadOnly="True" SortExpression="CustomerName" UniqueName="CustomerName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CustomerContact" FilterControlAltText="Filter CustomerContact column" HeaderText="CustomerContact" SortExpression="CustomerContact" UniqueName="CustomerContact"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Country" FilterControlAltText="Filter Country column" HeaderText="Country" SortExpression="Country" UniqueName="Country"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="date" DataType="System.DateTime" FilterControlAltText="Filter date column" HeaderText="date" SortExpression="date" UniqueName="date"> </telerik:GridBoundColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu></telerik:RadGrid>Hi ,
I am trying to create drop down inline in the kendo grid and i cannot bind the data. can you please let me know where i did wrong.
dsPartnerGrid = new kendo.data.DataSource({
serverFiltering: true,
serverPaging: true,
serverSorting: true,
autoBind: false,
batch: false,
autoSync: true,
pageSize: 30,
schema: {
model: {
id: "MPN_ID",
fields: {
"MPN_ID": { type: "string", editable: true, validation: { required: true } },
}
}
},
type: "odata",
transport: {
read: {
url: $.appConfig.ServiceUri + "/SAMGPLs",
dataType: "jsonp"
}
},
requestEnd: function (e) {
if (typeof (e.response) == 'undefined')
return;
if (e.response == null)
return;
if (typeof (e.response.d) == 'undefined')
return;
if (e.response.d.length == 0)
return;
}
})
$("#partnerGrid").kendoGrid({
dataSource: dsPartnerGrid,
pageable: true,
height: 550,
//filterable: {
// mode: "row"
//},
toolbar: ["create"],
columns: [
{ command: ["edit", "destroy"], title: " ", width: "150px" },
{ field: "MPN_ID", title: "MPN_ID", width: "150px", editor: mpnDropDownEditor, template: "#=Mpn.MPN_ID#"},
],
editable: "inline"
});
I'm trying to create a master/detail page for an Accounts table in our database. Our Accounts table has a few hundred fields in it, so the master grid should only show a short summary of a few pertinent fields for the user to identify which account they want to look at in detail. I would also like to display fields from a few joined tables in the master grid as well.
We are using an Web API & OData source. Instead of creating new endpoints to return the summary data I need, can we utilize the OData $select & $expand options with the Grid?
I might be missing something simple here, but if you have any suggestions or tutorials, I would appreciate it.
Hi,
I have a RadGrid. I would like to export it to excel and I would like to use the .xlsx format (ie: radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx). However, some columns have numerical names like 1234 or 01300 and I would like those particular columns to show up in the excel spreadsheet as a Text format - so 1.) 1234 would be left aligned in the cell just like any text and 2.) so that leading zeros aren't automatically removed.
I've tried many solutions from this forum - but all of them seem to only work in GridExcelExportFormat.Html format (like using the OnExporttoExcel event) or other grid formats like ExcelIML (ie. setting the DataFormatString attribute to contain a leading space = {0}).
I want to export to .xlsx format to avoid warnings and because .xlsx has been around for a long time now, and I'd like my software to export to a modern commonly used format.
Is there any solutions for this problem when using GridExcelExportFormat.Xlsx format?
See the attached images for the code.
Here is the code:
<telerik:RadGrid AutoGenerateColumns="false" ID="rgrBoundaryDefinitionList" OnNeedDataSource="rgrBoundaryDefinitionList_NeedDataSource" AllowFilteringByColumn="True" AllowSorting="True" Width="100%" ShowFooter="True" AllowPaging="True" PageSize="1000" runat="server" OnItemCommand="rgrBoundaryDefinitionList_ItemCommand" OnPreRender="rgrBoundaryDefinitionList_OnPreRender" EnableLinqExpressions="False"> <GroupingSettings CaseSensitive="false"></GroupingSettings> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True"/> </ClientSettings> <MasterTableView ShowHeadersWhenNoRecords="true" AutoGenerateColumns="false" AllowFilteringByColumn="True" ShowFooter="True" DataKeyNames="ClientId, BoundarySetId, Name, ClientName, ClientType, KeyFileName" NoMasterRecordsText="No Results" EnableColumnsViewState="True"> <SortExpressions> <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" /> </SortExpressions> <Columns> <telerik:GridTemplateColumn UniqueName="BoundarySetDetailsColumn" AllowFiltering="true" HeaderStyle-Width="70px"> <FilterTemplate> <asp:ImageButton ID="btnClearFilters" runat="server" ImageUrl="~/Images/clearfilter.png" AlternateText="Clear Filters" ToolTip="Clear Filters" OnClick="btnClearFilters_Click" Style="vertical-align: middle; " /> </FilterTemplate> <ItemTemplate> <telerik:RadButton ID="btnBoundarySetDetails" runat="server" Text="Details" CommandName="Details" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn FilterControlWidth="120px" DataField="Name" HeaderText="Boundary Name" DataFormatString="" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="150px" /> <telerik:GridBoundColumn FilterControlWidth="150px" DataField="ClientName" HeaderText="Organization Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="150px" /> <telerik:GridBoundColumn DataField="ClientType" HeaderText="Organization Type" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" HeaderStyle-Width="100px" /> <telerik:GridCheckBoxColumn DataField="IsUsingKeyFile" HeaderText="Keyfile" HeaderStyle-Width="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" ConvertEmptyStringToNull="False" UniqueName="IsUsingKeyFile"> <FilterTemplate> <telerik:RadComboBox ID="rcboFilterIsKey" runat="server" AllowCustomText="False " SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("IsUsingKeyFile").CurrentFilterValue %>' OnClientSelectedIndexChanged="IsKeyFileChanged" Width="40px" ViewStateMode="Disabled"> <Items> <telerik:RadComboBoxItem Text="All" Value="" /> <telerik:RadComboBoxItem Text="Yes" Value="True" /> <telerik:RadComboBoxItem Text="No" Value="False" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function IsKeyFileChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); var filterVal = args.get_item().get_value(); if (filterVal==null || filterVal == "") { tableView.filter("IsUsingKeyFile", "", "NoFilter"); } else { tableView.filter("IsUsingKeyFile", filterVal, "EqualTo"); } } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridCheckBoxColumn> <telerik:GridBoundColumn DataField="KeyFileName" Display="false" HeaderText="Keyfile Name" HeaderStyle-Width="200px" /> <telerik:GridBoundColumn DataField="Description" HeaderText="Description" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="150px" /> <telerik:GridCheckBoxColumn DataField="ClientDefault" HeaderText="Default" HeaderStyle-Width="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" ConvertEmptyStringToNull="False" UniqueName="ClientDefault"> <FilterTemplate> <telerik:RadComboBox ID="rcboFilterDefault" runat="server" AllowCustomText="False " SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientDefault").CurrentFilterValue %>' OnClientSelectedIndexChanged="IsDefaultChanged" Width="40px" ViewStateMode="Disabled"> <Items> <telerik:RadComboBoxItem Text="All" Value="" /> <telerik:RadComboBoxItem Text="Yes" Value="True" /> <telerik:RadComboBoxItem Text="No" Value="False" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="rsbDefaultScriptBlock" runat="server"> <script type="text/javascript"> function IsDefaultChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); var filterVal = args.get_item().get_value(); if (filterVal == null || filterVal == "") { tableView.filter("ClientDefault", "", "NoFilter"); } else { tableView.filter("ClientDefault", filterVal, "EqualTo"); } } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridCheckBoxColumn> <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status" DataType="System.String" HeaderStyle-Width="100px" FilterControlWidth="60px" /> </Columns> </MasterTableView></telerik:RadGrid>
And the code from the code behind for the export button handler:
protected void rbtnExport_Click(object sender, EventArgs e) {
rgrBoundaryDefinitionList.MasterTableView.GetColumn("KeyFileName").Display = true;
rgrBoundaryDefinitionList.MasterTableView.GetColumn("BoundarySetDetailsColumn").Display = false; rgrBoundaryDefinitionList.MasterTableView.GetColumn("ClientType").HeaderStyle.Width = Unit.Pixel(200); rgrBoundaryDefinitionList.MasterTableView.GetColumn("Description").HeaderStyle.Width = Unit.Pixel(500);
rgrBoundaryDefinitionList.ExportSettings.OpenInNewWindow = true;
rgrBoundaryDefinitionList.ExportSettings.ExportOnlyData = false;
rgrBoundaryDefinitionList.ExportSettings.HideStructureColumns = true;
rgrBoundaryDefinitionList.ExportSettings.IgnorePaging = true;
rgrBoundaryDefinitionList.ExportSettings.FileName = fileName;
rgrBoundaryDefinitionList.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;
rgrBoundaryDefinitionList.MasterTableView.ExportToExcel();
}
My Treelist is not displaying any records. I've verified that the data source works, because it's displaying in a standard grid.
The documentation states the following:
If the key fields are of value type or string, the root items are either:
In my datasource record ID 14 has a parentID 14 indicating it's a root item. Why is this not working in my treeList? Am I misunderstanding the documentation?

Hello! I would like to require the user to fill in a textbox before they can select a file for upload. Is there a javascript event that is fired on the click event of the select input? I want to prevent the file dialog from opening.
Thank you!
<telerik:RadAsyncUpload ID="fuMediaUpload" runat="server" AllowedFileExtensions=".MOV,.mp4,.wmv,.avi,.mpeg,.mpg,.mp3,.aac,.m4a" EnableInlineProgress="true" MaxFileInputsCount="1" ControlObjectsVisibility="None" DisableChunkUpload="false" Skin="Bootstrap" MaxFileSize="629145600" ChunkSize="10485760" OverwriteExistingFiles="true" RenderMode="Lightweight" HideFileInput="true" localization-select="Select Media File" OnClientFileUploadRemoved="OnClientFileUploadRemoved" OnClientFileUploaded="OnClientFileUploaded" EnableViewState="true" > </telerik:RadAsyncUpload>
Hi,
Im trying to create an xlsx Output with the XlsxRenderer from Telerik.Web.UI.ExportInfrastructure. When having only one Worksheet/Table everythings fine. But after adding a second worksheet with ExportStructure.Tables.Add Function, when rendering the output in the resulting xlsx file the first sheet gets overwritten with the data from the second sheet.
When i use the XlsBiffRenderer with exactly the same structure everything works fine, so i dont know if this is a bug or im doing anything wrong.
We are using version 2016.1 of the telerik controls.
Regards Alex