Hi all,
Please hlelp on this issue , It is very urgent .
I need to do goup by (By Drag and drop ) . When I am using GridBoundColumn It is working fine. but when i am using
GridTemplateColumn with HeaderTemplate . I am not able to do drag and drop columns to do groupby and sorting the column also.I am not binding values in the header template . I am just arranging with a label with text value set directly and image.
Whether Is it mandatroy that i must bind some thing to the label in header template. I couldnt understand why it is not working .
Here is code i am using
<telerik:GridTemplateColumn GroupByExpression="CloseOutType" DataField="CloseOutType" SortExpression="CloseOutType" HeaderStyle-CssClass="xmediumcolsize" > <HeaderTemplate> <asp:Image ID="imgCloseOutType" ImageUrl="~/Images/closeout_type.png" runat="server" /> <asp:Label ID="lblheaderCloseOutType" runat="server" Text="Interim/Workbook" ></asp:Label> <%-- <asp:HiddenField ID="HiddenField1" Value='<%# eval("CloseOutType") %>' runat="server" />--%> </HeaderTemplate> <ItemTemplate> <asp:Label ID="lblCloseOutType" runat="server" Text='<%# eval("CloseOutType") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn>Hello,
I'm trying to use the control RadAjaxLoadingPanel based on the demo http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/loadingimages/defaultcs.aspx .
For unkown reason, it is not working, the RadAjaxLoadingPanel control is not displayed.
Note: I'm using the 2009.3.1314.35 Version.
Here is my page:
Aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <style type="text/css"> .module1 { background-color: #dff3ff; border: 1px solid #c6e1f2; } </style> <Telerik:RadStyleSheetManager ID="SSH1" EnableStyleSheetCombine="true" runat="server"> <StyleSheets> <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" /> <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Default.Editor.Default.css" /> <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" /> <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Default.Window.Default.css" /> </StyleSheets> </Telerik:RadStyleSheetManager></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="ScriptManager1" runat="server" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Panel1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="CheckBox1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="DropDownList1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Panel runat="server" ID="ConfigurationPanel1" Title="Configurator" Expanded="true"> <table> <tr> <td style="width: 200px"> <asp:CheckBox ID="CheckBox1" runat="server" Text="EnableSkinTransparency" Checked="true" AutoPostBack="true" OnCheckedChanged="CheckBox1_CheckedChanged" /><br /> <br /> </td> <td> Change Background Position:<br /> <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem>Bottom</asp:ListItem> <asp:ListItem>BottomLeft</asp:ListItem> <asp:ListItem>BottomRight</asp:ListItem> <asp:ListItem Selected="True">Center</asp:ListItem> <asp:ListItem>Left</asp:ListItem> <asp:ListItem>None</asp:ListItem> <asp:ListItem>Right</asp:ListItem> <asp:ListItem>Top</asp:ListItem> <asp:ListItem>TopLeft</asp:ListItem> <asp:ListItem>TopRight</asp:ListItem> </asp:DropDownList> </td> </tr> </table> </asp:Panel> <fieldset class="module1"> <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px"> <asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click" Style="margin-top: 15px; margin-left: 15px" CssClass="qsfButtonBigger" /> </asp:Panel> </fieldset> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <!-- content end --> </div> </form></body></html>c#:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;public partial class Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { //simulate longer page load System.Threading.Thread.Sleep(2000); } protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { RadAjaxLoadingPanel1.EnableSkinTransparency = (sender as CheckBox).Checked; } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { AjaxLoadingPanelBackgroundPosition position = new AjaxLoadingPanelBackgroundPosition(); if (DropDownList1.SelectedValue == "Bottom") { position = AjaxLoadingPanelBackgroundPosition.Bottom; } if (DropDownList1.SelectedValue == "BottomLeft") { position = AjaxLoadingPanelBackgroundPosition.BottomLeft; } if (DropDownList1.SelectedValue == "BottomRight") { position = AjaxLoadingPanelBackgroundPosition.BottomRight; } if (DropDownList1.SelectedValue == "Center") { position = AjaxLoadingPanelBackgroundPosition.Center; } if (DropDownList1.SelectedValue == "Left") { position = AjaxLoadingPanelBackgroundPosition.Left; } if (DropDownList1.SelectedValue == "None") { position = AjaxLoadingPanelBackgroundPosition.None; } if (DropDownList1.SelectedValue == "Right") { position = AjaxLoadingPanelBackgroundPosition.Right; } if (DropDownList1.SelectedValue == "Top") { position = AjaxLoadingPanelBackgroundPosition.Top; } if (DropDownList1.SelectedValue == "TopLeft") { position = AjaxLoadingPanelBackgroundPosition.TopLeft; } if (DropDownList1.SelectedValue == "TopRight") { position = AjaxLoadingPanelBackgroundPosition.TopRight; } RadAjaxLoadingPanel1.BackgroundPosition = position; }}Please, I need you help,
It is apprecited to send me the modified code.
Regards,
Bader
<div> <telerik:RadGrid id="RadGrid1" runat="server" gridlines="None" allowpaging="True" allowsorting="True" autogeneratecolumns="False" width="97%" enableajax="True" CellSpacing="0" DataSourceID="SqlDataSource1" AllowFilteringByColumn="True" onneeddatasource="RadGrid1_NeedDataSource" ShowFooter="True" Skin="Black" > <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> <Selecting AllowRowSelect="True"/> </ClientSettings> <MasterTableView GridLines="None" Width="100%" CommandItemSettings-ShowExportToCsvButton="true" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemDisplay ="Top" DataSourceID="SqlDataSource1" > <Columns> <telerik:GridBoundColumn DataField="SequencialNumber" HeaderText="SequencialNumber" UniqueName="SequencialNumber" SortExpression="SequencialNumber">
.......<%@ Page Title="" Language="C#" MasterPageFile="~/Operator.Master" AutoEventWireup="true" CodeBehind="Channels.aspx.cs" Inherits="IMS_Telerik.Operators.Prepare.TelevisionRadio.Channels" %><%@ Register Assembly="Telerik.OpenAccess.Web" Namespace="Telerik.OpenAccess" TagPrefix="telerik" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <table cellpadding="0" cellspacing="0" style="border: none;" width="100%"> <tr> <td style="border: none;" valign="top" width="300px"> <table width="300px" cellpadding="0" cellspacing="0" style="padding: 5px; border: solid 1px #e8eef4; margin-right:15px;"> <tr> <td valign="top" style="margin-right: 15px"> <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Black" Width="100%"> <Items> <telerik:RadPanelItem runat="server" Expanded="True" Text="Actions"> <Items> <telerik:RadPanelItem runat="server" Height="30px" ImageUrl="~/Images/Icons/Menu/rtvchannel.png" Selected="True" Text="Channels"> </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Height="30px" ImageUrl="~/Images/Icons/Menu/rtvchannel-add.png" NavigateUrl="~/Operators/Prepare/TelevisionRadio/AddChannels.aspx" Text="Add Channel"> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> </Items> </telerik:RadPanelBar> </td> </tr> </table> </td> <td style="border: none;" valign="top"> <table width="100%" cellpadding="0" cellspacing="0" style="padding: 5px; border: solid 1px #e8eef4;"> <tr> <td valign="top"> <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="OpenAccessDataSource1" GridLines="None" Skin="Black" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" ShowGroupPanel="True"> <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True"> <Selecting AllowRowSelect="True" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings><MasterTableView AutoGenerateColumns="False" DataSourceID="OpenAccessDataSource1"><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="Channel_id" DataType="System.UInt32" FilterControlAltText="Filter Channel_id column" HeaderText="Channel_id" SortExpression="Channel_id" UniqueName="Channel_id"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_epg_id" FilterControlAltText="Filter Channel_epg_id column" HeaderText="Channel_epg_id" SortExpression="Channel_epg_id" UniqueName="Channel_epg_id" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_name" FilterControlAltText="Filter Channel_name column" HeaderText="Channel_name" SortExpression="Channel_name" UniqueName="Channel_name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_image" FilterControlAltText="Filter Channel_image column" HeaderText="Channel_image" SortExpression="Channel_image" UniqueName="Channel_image"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_image_icon" FilterControlAltText="Filter Channel_image_icon column" HeaderText="Channel_image_icon" SortExpression="Channel_image_icon" UniqueName="Channel_image_icon" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_level" FilterControlAltText="Filter Channel_level column" HeaderText="Channel_level" SortExpression="Channel_level" UniqueName="Channel_level" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_category" FilterControlAltText="Filter Channel_category column" HeaderText="Channel_category" SortExpression="Channel_category" UniqueName="Channel_category" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_group" FilterControlAltText="Filter Channel_group column" HeaderText="Channel_group" SortExpression="Channel_group" UniqueName="Channel_group"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_epg" FilterControlAltText="Filter Channel_epg column" HeaderText="Channel_epg" SortExpression="Channel_epg" UniqueName="Channel_epg" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_type" FilterControlAltText="Filter Channel_type column" HeaderText="Channel_type" SortExpression="Channel_type" UniqueName="Channel_type" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_archive" FilterControlAltText="Filter Channel_archive column" HeaderText="Channel_archive" SortExpression="Channel_archive" UniqueName="Channel_archive" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_direct" FilterControlAltText="Filter Channel_direct column" HeaderText="Channel_direct" SortExpression="Channel_direct" UniqueName="Channel_direct" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_url" FilterControlAltText="Filter Channel_url column" HeaderText="Channel_url" SortExpression="Channel_url" UniqueName="Channel_url"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_block_url" FilterControlAltText="Filter Channel_block_url column" HeaderText="Channel_block_url" SortExpression="Channel_block_url" UniqueName="Channel_block_url" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_block_name" FilterControlAltText="Filter Channel_block_name column" HeaderText="Channel_block_name" SortExpression="Channel_block_name" UniqueName="Channel_block_name" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_block_timeshift" FilterControlAltText="Filter Channel_block_timeshift column" HeaderText="Channel_block_timeshift" SortExpression="Channel_block_timeshift" UniqueName="Channel_block_timeshift" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Channel_auth" FilterControlAltText="Filter Channel_auth column" HeaderText="Channel_auth" SortExpression="Channel_auth" UniqueName="Channel_auth"> </telerik:GridBoundColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> </telerik:RadGrid> <telerik:OpenAccessDataSource ID="OpenAccessDataSource1" runat="server" ObjectContextProvider="IMS_Telerik.EntitiesModel, IMS Telerik" TypeName="IMS_Telerik.Channel" Where="" EnableDelete="true" EnableUpdate="true"> <UpdateParameters> <asp:Parameter Name="Channel_name" DbType="String" /> </UpdateParameters> </telerik:OpenAccessDataSource> </td> </tr> </table> </td> </tr> </table></asp:Content><telerik:RadListBox ID="RadListBox1" runat="server" AllowReorder="True" Skin="Black" SelectionMode="Multiple" Sort="Ascending" Height="400px" Width="250px" EnableDragAndDrop="True"> <ButtonSettings TransferButtons="All"></ButtonSettings> <HeaderTemplate> <h5 style="color: White; text-align: center"> USERS</h5> </HeaderTemplate> </telerik:RadListBox> <telerik:RadListBox ID="RadListBox2" runat="server" SelectionMode="Multiple" EnableDragAndDrop="True" Height="400px" Width="200px" AllowReorder="True" Skin="Black"> <ButtonSettings TransferButtons="All"></ButtonSettings> <HeaderTemplate> <h5 style="color: White; text-align: center"> GROUPS</h5> </HeaderTemplate> </telerik:RadListBox> <telerik:RadListBox ID="RadListBox3" runat="server" SelectionMode="Multiple" EnableDragAndDrop="True" Height="400px" Width="200px" AllowReorder="True" Skin="Black"> <ButtonSettings TransferButtons="All"></ButtonSettings> <HeaderTemplate> <h5 style="color: White; text-align: center"> STAGING</h5> </HeaderTemplate> </telerik:RadListBox> <telerik:RadButton ID="RadButton1" runat="server" Text="Assign" Skin="Black" Width="100px" Height="50px" onclick="RadButton1_Click"> </telerik:RadButton>