Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed .
Kindly help me I am in trouble.
Hi,
I have a question in this topic. I reviewed this topic in the help (
http://www.telerik.com/help/aspnet-ajax/grdpopulatinggridfromxml.html) and also I checked the example from the demo and I have this question: is there a way to load the structure of the grid (columns and format only, no data) from and XML into a grid that has been place in the page in the design time? I do not want to create the grid dynamically. If so, can somebody provide me an example?
Thanks
| protected void grdSponsoredLinks_ColumnCreated(object sender, GridColumnCreatedEventArgs e) |
| { |
| // Set the LinkButtons to show as Edit / Delete icons instead |
| foreach ( GridColumn column in grdSponsoredLinks.MasterTableView.Columns ) |
| { |
| if ( column.ColumnType == "GridButtonColumn" ) |
| { |
| (column as GridButtonColumn).ButtonType = GridButtonColumnType.ImageButton; |
| // (column as GridButtonColumn).ItemStyle.Width = Unit.Point(C_DEFAULT_EDITCOMMAND_COLUMN_WIDTH); |
| (column as GridButtonColumn).ItemStyle.HorizontalAlign = HorizontalAlign.Center; |
| } |
| if ( column.ColumnType == "GridEditCommandColumn" ) |
| { |
| (column as GridEditCommandColumn).ButtonType = GridButtonColumnType.ImageButton; |
| (column as GridEditCommandColumn).ItemStyle.HorizontalAlign = HorizontalAlign.Center; |
| } |
| } |
<telerik:RadSlider runat="server" ID="RadSlider1" IsSelectionRangeEnabled="true" MaximumValue="100" MinimumValue="0" SmallChange="1"
SelectionEnd="100" SelectionStart="0" OnClientValueChange="OnClientValueChange" OnValueChanged="RadSlider1_ValueChanged"
OnClientSlideStart="OnClientSlideStart" AutoPostBack="true" Skin="Telerik" ShowDecreaseHandle="false" ShowIncreaseHandle="false" />
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sqldsDiamsearchDetails" GridLines="Both" AllowPaging="true" PageSize="30" Skin="Telerik" Height="300px" Width="600px" >
<GroupPanel ID="GroupPanel1" PanelStyle-Width="100%" >
</GroupPanel>
<MasterTableView AutoGenerateColumns="false" DataKeyNames="Cutdesc" DataSourceID="sqldsDiamsearchDetails" Width="600px">
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" MinDisplayTime="500" >
<img src='<% =RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading1.gif") %>' alt="Loading.." style="border: 0; margin-top: 45px;" />
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager id="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating" >
<AjaxSettings >
<telerik:AjaxSetting AjaxControlID="RadSlider1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="start1" />
<telerik:AjaxUpdatedControl ControlID="start2" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
.cs
protected
void RadAjaxManager1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)
{
e.UpdatePanel.RenderMode =
UpdatePanelRenderMode.Inline;
}
i need ur help.
Regards,
Prakash
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_TEST2.aspx.cs" Inherits="CN._TEST2" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="SqlDataSource" Width="1000px" Visible="true" Height="250px" ChartTitle-Visible="false"> |
| <Series> |
| <telerik:ChartSeries Name="Value" DataYColumn="Value" > |
| <Appearance LabelAppearance-Visible="false" Border-Width="1" Border-Color="Silver" FillStyle-MainColor="243, 206, 119" FillStyle-SecondColor="210, 157, 44" /> |
| </telerik:ChartSeries> |
| </Series> |
| <PlotArea> |
| <YAxis AutoScale="false" MaxValue="4000000" MinValue="-4000000" /> |
| <Appearance Dimensions-Margins="20px, 130px, 60px, 130px" /> |
| </PlotArea> |
| <Legend Visible="false" /> |
| </telerik:RadChart> |
| <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CN %>" |
| SelectCommand="SELECT 3500000 as 'Value' UNION SELECT -3000000 as 'Value' UNION SELECT 2500000 as 'Value' UNION SELECT -2000000 as 'Value'" |
| SelectCommandType="Text" /> |
| </div> |
| </form> |
| </body> |
| </html> |