<PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="{4}Celkový počet záznamov: <b>{5}</b>" /><PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="true" PagerTextFormat="{4}<%$ Resources: Application, String1 %>{5}" />
<form id="form1" runat="server"> <div> <telerik:RadScriptManager runat="server" ID="RadScriptManager1"> </telerik:RadScriptManager> <table> <tr> <td><telerik:RadComboBox ID="RadComboBox1" runat="server" Width="186px" AutoPostBack="true" EnableLoadOnDemand = "true" Filter="Contains" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" Label="Country:" /></td> <td><telerik:RadComboBox ID="RadComboBox2" runat="server" Width="186px" AllowCustomText="true" Filter="Contains" Label="Province:" OnSelectedIndexChanged="RadComboBox2_SelectedIndexChanged" /></td> </tr> <tr> <td>Country : <asp:Label ID="lblCountry" runat="server" Text=""></asp:Label> </td> <td>Province :<asp:Label ID="lblProvince" runat="server" Text=""></asp:Label></td> </tr> </table> <asp:XmlDataSource runat="server" id="XmlDataSource1" XPath="Countries" DataFile="~/App_Data/CountryRegionMapping.xml"/> </div> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadComboBox1" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadComboBox2" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> </form><configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpHandlers> <remove verb="*" path="*.asmx" /> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> </httpHandlers> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </httpModules> </system.web> </configuration>
myDDL.DataTextField = ds.Tables[0].Columns["DATA"].ToString(); myDDL.DataValueField = ds.Tables[0].Columns[0].ToString(); myDDL.DataSource = ds.Tables[0]; var myValue = String.Empty; var ddlValue = DataBinder.Eval(DataItem, "DATA"); Session["ddlValue"] = ddlValue; myValue = Session["ddlValue"].ToString(); if (DataItem != null) { if (myDDL.FindItemByValue(ddlValue.ToString()) == null) { myDDL.SelectedIndex = -1; } else { myDDL.SelectedValue = ddlValue.ToString(); } } else { myDDL.SelectedValue = myValue; }}
<telerik:RadGrid ID="rgContacts" runat="server" AutoGenerateColumns="False" OnNeedDataSource="rgContacts_NeedDataSource" Skin="Silk" ShowHeader="false" GridLines="None" BorderStyle="Groove" BorderWidth="1px" Width="250px" BorderColor="#555555" AlternatingItemStyle-BackColor="White" BackColor="#bbeaf3"> <MasterTableView DataKeyNames="contact_id" EditMode="PopUp"> <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add a New Contact"/> <EditFormSettings PopUpSettings-Modal="true" UserControlName="controls/Contacts/CustomerContact.ascx" EditFormType="WebUserControl" InsertCaption="Create New Contact" CaptionFormatString="Edit Contact" FormCaptionStyle-Font-Bold="true" FormCaptionStyle-Font-Size="X-Large" FormStyle-BackColor="#dedddc" />Hi,
My requirement is to export RadGrid data to excel when user clicks on button outside RadGrid.
The following are the customizations that are needed:
1) Save or Open dialogue box should show up for opening or saving excel file.
2) Add company logo to excel file at certain position. Like row1 column1 to row5 column5. Logo size (gif format) is
always going to be same. Currently we are doing it by accessing worksheet and adding it.
3) we should be able to specify from where data should start showing up like row7..
4) We are hiding some columns in the grid. When exported, these shouldn't be exported.
5) Some rows in the grid are disabled. User can't click them. They shouldn't be exported.
6) Add a title and format it.
7) Format print options like margin etc..
I appreciate your help. Please let me know if there are any links about how to take care of it.
Thanks,
Prathiba.