Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
Hi,

In this particular page RadAjaxLoadingPanel does not show up. Instead the Grid blinks. I have tried in other pages, it works. What cud be the issue?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Website1.Forecast_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<head id="Head1" runat="server">
    <title>STATS</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" runat="server" />
    <table border="0" cellpadding="2" style="width: 98%">
        <tr>
            <td>
                <asp:Label runat="server" ID="lblMessage" SkinID="infoLabel" />
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <table style="width: 100%">
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblNewTitleQueue" runat="server" Text="New Title Queue"></asp:Label>
                                        </td>
                                        <td align="right">
                                            <asp:ImageButton ID="imgNewGridClearFilter" runat="server" ImageUrl="~/App_Themes/STATS/Images/filter_clear.png"
                                                ToolTip="Clear filter" OnClick="imgNewGridClearFilter_OnClick" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <telerik:RadGrid ID="rgNewQueue" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                                    AllowPaging="True" PageSize="5" AllowFilteringByColumn="true" OnSortCommand="rgNewQueue_OnSortCommand"
                                    OnPageIndexChanged="rgNewQueue_OnPageIndexChanged" OnPageSizeChanged="rgNewQueue_OnPageSizeChanged"
                                    OnItemCommand="rgNewQueue_OnItemCommand" Width="925px">
                                    <GroupingSettings CaseSensitive="false" />
                                    <MasterTableView AutoGenerateColumns="false" DataKeyNames="ProductId" GridLines="None"
                                        AllowSorting="true" AllowPaging="true" ShowHeadersWhenNoRecords="true" EnableNoRecordsTemplate="true"
                                        NoMasterRecordsText="No titles found" AllowNaturalSort="false">
                                        <Columns>
                                            <telerik:GridTemplateColumn UniqueName="unqTitle" HeaderText="Title" SortExpression="Title"
                                                AutoPostBackOnFilter="true" AllowFiltering="true" CurrentFilterFunction="Contains"
                                                ShowFilterIcon="False" FilterControlWidth="150px" DataField="Title">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkTitle" CommandName="cmdTitleSelect" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("Title")))%>'></asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqStudio" HeaderText="Studio" SortExpression="StudioName"
                                                AutoPostBackOnFilter="true" AllowFiltering="true" CurrentFilterFunction="Contains"
                                                ShowFilterIcon="False" FilterControlWidth="100px" DataField="StudioName">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblStudio" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("StudioName")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqGenre" HeaderText="Genre" SortExpression="GenreName"
                                                AutoPostBackOnFilter="true" AllowFiltering="true" CurrentFilterFunction="Contains"
                                                ShowFilterIcon="False" FilterControlWidth="60px" DataField="GenreName">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGenre" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("GenreName")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqSRP" HeaderText="SRP" SortExpression="SRP"
                                                AllowFiltering="false">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCost" runat="server" Text='<%# DisplayCost(Convert.ToString(Eval("SRP")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqAWP" HeaderText="AWP" SortExpression="AWP"
                                                AllowFiltering="false">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblListPrice" runat="server" Text='<%# DisplayCost(Convert.ToString(Eval("AWP")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqConfig" HeaderText="Config" SortExpression="ConfigCode"
                                                AutoPostBackOnFilter="true" AllowFiltering="true" CurrentFilterFunction="Contains"
                                                ShowFilterIcon="False" FilterControlWidth="60px" DataField="ConfigCode">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblConfig" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("ConfigCode")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqReleaseDate" HeaderText="Release Date"
                                                SortExpression="ReleaseDate" AllowFiltering="false">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblReleaseDate" runat="server" Text='<%# DisplayDate(Convert.ToString(Eval("ReleaseDate")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqOrderDueDate" HeaderText="Order Due Date"
                                                SortExpression="OrderDueDate" AllowFiltering="false">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOrderDueDate" runat="server" Text='<%# DisplayDate(Convert.ToString(Eval("OrderDueDate")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="unqExclusive" HeaderText="Exclusive?" SortExpression="Exclusive"
                                                AllowFiltering="false">
                                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblExclusive" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("Exclusive")))%>'></asp:Label></ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                            </td>
                        </tr>
                    </table>
                </telerik:RadAjaxPanel>
            </td>
        </tr>
        <tr>
            <td style="height: 25px">
            </td>
        </tr>
        <tr>
            <td style="height: 2px; background-color: Black">
            </td>
        </tr>
        <tr>
            <td style="height: 25px">
            </td>
        </tr>
        <tr>
            <td>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <asp:Label ID="lblSearchTitle" runat="server" Text="Search for Title"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" colspan="2">
                            <table cellspacing="15px" style="height: 100%">
                                <tr>
                                    <td>
                                        <telerik:RadTextBox ID="rtxtTitle" runat="server" Text="" Width="150px">
                                        </telerik:RadTextBox><br />
                                        <asp:Label ID="lblTitle" runat="server" Text="Title"></asp:Label>
                                    </td>
                                    <td>
                                        <telerik:RadTextBox ID="rtxtStudio" runat="server" Text="" Width="150px">
                                        </telerik:RadTextBox><br />
                                        <asp:Label ID="lblStudio" runat="server" Text="Studio"></asp:Label>
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="rcbGenre" runat="server" Width="120px">
                                        </telerik:RadComboBox>
                                        <br />
                                        <asp:Label ID="lblGenre" runat="server" Text="Genre"></asp:Label>
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="rcbConfig" runat="server" Width="75px">
                                        </telerik:RadComboBox>
                                        <br />
                                        <asp:Label ID="lblConfig" runat="server" Text="Config"></asp:Label>
                                    </td>
                                    <td valign="top">
                                        <telerik:RadNumericTextBox ID="rtxtSRP" runat="server" Width="80px">
                                        </telerik:RadNumericTextBox><br />
                                        <asp:Label ID="lblSRP" runat="server" Text="SRP"></asp:Label>
                                    </td>
                                    <td valign="top">
                                        <telerik:RadNumericTextBox ID="rtxtAWP" runat="server" Width="80px">
                                        </telerik:RadNumericTextBox><br />
                                        <asp:Label ID="lblAWP" runat="server" Text="AWP"></asp:Label>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadDatePicker ID="rdpRelDate" runat="server" Width="150px">
                                        </telerik:RadDatePicker>
                                        <br />
                                        <asp:Label ID="lblRelDate" runat="server" Text=" Release Date"></asp:Label>
                                    </td>
                                    <td>
                                        <telerik:RadDatePicker ID="rdpOrderDueDate" runat="server" Width="150px">
                                        </telerik:RadDatePicker>
                                        <br />
                                        <asp:Label ID="lblOrderDueDate" runat="server" Text="Order Due Date"></asp:Label>
                                    </td>
                                    <td colspan="2">
                                        <telerik:RadComboBox ID="rcbStatus" runat="server" Width="150px">
                                        </telerik:RadComboBox>
                                        <br />
                                        <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
                                    </td>
                                    <td colspan="2">
                                        <asp:CheckBox ID="chkReturnItems" runat="server" Checked="true" Text="Return my items only"
                                            Width="150px" />
                                    </td>
                                    <td valign="top">
                                        <asp:Button ID="btnSearch" runat="server" Text="Search" Width="100px" OnClick="btnSearch_Click" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td>
                                        <asp:Label ID="lblResults" runat="server" Text="Results:"></asp:Label>
                                    </td>
                                    <td align="right">
                                        <asp:ImageButton ID="imgResultsGridClearFilter" runat="server" ImageUrl="~/App_Themes/STATS/Images/filter_clear.png"
                                            ToolTip="Clear filter" OnClick="imgResultsGridClearFilter_OnClick" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <telerik:RadGrid ID="rgSearchTitle" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                                AllowPaging="True" PageSize="5" OnSortCommand="rgSearchTitle_OnSortCommand" OnItemDataBound="rgSearchTitle_ItemDataBound"
                                OnPageIndexChanged="rgSearchTitle_OnPageIndexChanged" OnPageSizeChanged="rgSearchTitle_OnPageSizeChanged"
                                Width="925px">
                                <GroupingSettings CaseSensitive="false" />
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="ProductId" GridLines="None"
                                    AllowSorting="true" AllowPaging="true" ShowHeadersWhenNoRecords="true" EnableNoRecordsTemplate="true"
                                    NoMasterRecordsText="No titles found" AllowNaturalSort="false">
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="unqTitle" HeaderText="Title" SortExpression="Title"
                                            DataField="Title">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnkTitle" PostBackUrl='<%# "~/Forecasting/TitleForecast.aspx?ProductId=" + Eval("ProductId").ToString()+"&ForecastId="+ Eval("ForecastId").ToString()%>'
                                                    runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("Title")))%>'></asp:LinkButton>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqConfig" HeaderText="Config" SortExpression="ConfigCode"
                                            DataField="Config">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblConfig" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("ConfigCode")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqStudio" HeaderText="Studio" SortExpression="StudioName"
                                            DataField="Studio">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblStudio" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("StudioName")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqGenre" HeaderText="Genre" SortExpression="GenreName"
                                            DataField="Genre">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblGenre" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("GenreName")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqSRP" HeaderText="SRP" SortExpression="SRP"
                                            AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblCost" runat="server" Text='<%# DisplayCost(Convert.ToString(Eval("SRP")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqAWP" HeaderText="AWP" SortExpression="AWP"
                                            AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblListPrice" runat="server" Text='<%# DisplayCost(Convert.ToString(Eval("AWP")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqReleaseDate" HeaderText="Release Date"
                                            SortExpression="ReleaseDate" AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblReleaseDate" runat="server" Text='<%# DisplayDate(Convert.ToString(Eval("ReleaseDate")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqOrderDueDate" HeaderText="Order Due Date"
                                            SortExpression="OrderDueDate" AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblOrderDueDate" runat="server" Text='<%# DisplayDate(Convert.ToString(Eval("OrderDueDate")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqStatus" HeaderText="Status" SortExpression="StatusName"
                                            AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblStatus" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("ForecastStatusName")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="unqUpdatedBy" HeaderText="Last Updated By"
                                            SortExpression="LastUpdatedName" AllowFiltering="false">
                                            <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblUpdatedBy" runat="server" Text='<%# DisplayInRadGrid(Convert.ToString(Eval("LastUpdatedName")))%>'></asp:Label></ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                </table>
                <asp:HiddenField ID="hdnDefSearch" runat="server" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

Rahul
Top achievements
Rank 1
 answered on 20 Dec 2010
4 answers
165 views
Hi,

I am having a problem that I can't figure out.  I am trying to use the RadGrid to manage a list, part of which is a LastUpdated for each item.  It is stored in a database as a DateTime and I am using a LINQ to SQL datasource object.  Everything works great in the grid except the date time picker.  I am using the following code for my Date Time column:

<telerik:GridDateTimeColumn DataField="LastUpdated" HeaderText="LastUpdated"  
                            SortExpression="LastUpdated" UniqueName="LastUpdated"  
                            DataType="System.DateTime" PickerType="DateTimePicker">
</telerik:GridDateTimeColumn> 

The date and time picker icons show up but they are grayed out and I can't do anything with them.  I have searched and searched and no one else seems to have had this problem and I have made sure my code is using the exact same syntax as others who have gotten theirs working.  What am I doing wrong.  Did I forget something important?  I am using the ASPNET AJAX Q2 2008.  Thanks in advance.

Brandon
Kiara
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
44 views
Hi,  The issue I'm having is the in IE6, the select drop downs within my page are coming through the tool tip, when the tool tip should be the most foreground item. 

Cheers,

Davoc
Svetlina Anati
Telerik team
 answered on 20 Dec 2010
2 answers
83 views
I am having a problem setting the filter item border. The header and all other item's border is getting set whereas Filter Row items are not.
Can anyone help with this.?
I have attached the screenshot.
I have set the Filter-Item Style under rad grid and MasterTableView Tags. But that doesnt seem to work.
Thanks and Regards,
Niraj Khose
Niraj
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
80 views
I want to remove this line below you can see at picture, how I can do it and I want to set this close button hard by with maximize icon
see picture
Georgi Tunev
Telerik team
 answered on 20 Dec 2010
1 answer
101 views
Hi Forum,
Please assist, I am creating the Radgrid programmatically and want to add Radcombox as a filtering item to it. 
 No Clue, and I've tried everything I can find. 
I want the design output like the attached file.

Bali.

 here is sample code i am using.

     rdGrd = new RadGrid();
            rdGrd.AutoGenerateColumns = false;
            rdGrd.AllowPaging = true;           
            rdGrd.AllowSorting = true;
            rdGrd.AllowFilteringByColumn = true;     

            rdGrd.Width = Unit.Pixel(600);
            rdGrd.EnableAJAX = true;
            rdGrd.EnableAJAXLoadingTemplate = true;
            rdGrd.Skin = "None";
                      
            rdGrd.NeedDataSource += new GridNeedDataSourceEventHandler(rdGrd_NeedDataSource);
            rdGrd.ItemDataBound += new GridItemEventHandler(rdGrd_ItemDataBound);
            rdGrd.PageSize = 25;
            rdGrd.ID = "grd";

  GridBoundColumn boundColumn1 = new GridBoundColumn();
                boundColumn1.DataField = "FirmName";
                boundColumn1.UniqueName = "Firm";
                boundColumn1.HeaderText = "Firm";
                boundColumn1.AllowFiltering = true;                
                boundColumn1.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                boundColumn1.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                boundColumn1.ItemStyle.VerticalAlign = VerticalAlign.Top;

  GridTemplateColumn templateColumnRank = new GridTemplateColumn();
                templateColumnRank.AllowFiltering = false;
                templateColumnRank.HeaderTemplate = new NColHeaderTemplate(120, "Rank", "cont3", "2009, 2008", "LeaderRank, LeaderRankM1", "cont4, cont5");
                templateColumnRank.ItemTemplate = new NColItemTemplate(120, "LeaderRank, LeaderRankM1", "cont1, cont2");

  HOW CAN I ADD A RADCOBOBOX HERE AS A FILTERING ITEM

  rdGrd.MasterTableView.Columns.Add(templateColumnRank);
                rdGrd.MasterTableView.Columns.Add(boundColumn1);
  
     this.Controls.Add(rdGrd);

 

public class NColHeaderTemplate : ITemplate
    {
        protected LiteralControl lControl0;
        private int iColumnWidth;
        private int nColHeader;
        private string sTopLevelColumnName;
        private string sTopLevelColumnNameUniqueID;
        private string[] sNBottomColumnName;
        private string[] sNBottomColSortCommandArgument;
        private string[] sNBottomColumnNameUniqueID;
        private string sCellHorizontalAlign;

        public NColHeaderTemplate(int ColumnWidth, string TopLevelColumnName, string TopLevelColumnNameUniqueID, string NBottomColumnName, string NBottomColSortCommandArgument, string NBottomColumnNameUniqueID)
        {
            iColumnWidth = ColumnWidth;
            sTopLevelColumnName = TopLevelColumnName.Trim();
            sTopLevelColumnNameUniqueID = TopLevelColumnNameUniqueID.Trim();
            sNBottomColumnName = NBottomColumnName.Split(Convert.ToChar(","));
            sNBottomColSortCommandArgument = NBottomColSortCommandArgument.Split(Convert.ToChar(","));
            sNBottomColumnNameUniqueID = NBottomColumnNameUniqueID.Split(Convert.ToChar(","));
            //ColHeaderParam = nColHeaderParam.Split(Convert.ToChar(","));
            nColHeader = sNBottomColumnName.Length;
            sCellHorizontalAlign = "Center";
        }

       
        public void InstantiateIn(System.Web.UI.Control container)
        {
            lControl0 = new LiteralControl();
            lControl0.ID = sTopLevelColumnNameUniqueID;
            lControl0.Text = sTopLevelColumnName;

            Table table = new Table();
            table.Width = Unit.Pixel(iColumnWidth);

            TableRow row1 = new TableRow();
            TableRow row2 = new TableRow();

            TableCell cell11 = new TableCell();
           
            cell11.Controls.Add(lControl0);
            cell11.ColumnSpan = nColHeader;

            row1.Cells.Add(cell11);
            table.Rows.Add(row1);

            for (int i = 0; i < nColHeader; i++)
            {

                LinkButton lbControl = new LinkButton();
                lbControl.ID = sNBottomColumnNameUniqueID[i].ToString().Trim();
                lbControl.Text = sNBottomColumnName[i].ToString().Trim();
                lbControl.CommandName = "Sort";
                lbControl.CommandArgument = sNBottomColSortCommandArgument[i].ToString().Trim();

                TableCell cell = new TableCell();
                cell.HorizontalAlign = HorizontalAlign.Center
               
                cell.Controls.Add(lbControl);
                cell.Width = iColumnWidth / nColHeader;
                row2.Cells.Add(cell);

            }

            table.Rows.Add(row2);
            container.Controls.Add(table);
        }
    }

    public class NColItemTemplate : ITemplate
    {

        //protected LiteralControl lControl;
        protected HyperLink lControl;
        private int iColumnWidth;
        private int nColItem;
        private string[] sNBottomDataColumnName;
        private string[] sNBottomDataControlUniqueID;
        private string sBottomDataColumnName;
        private string sCellHorizontalAlign;
       

        public NColItemTemplate(int ColumnWidth, string NBottomDataColumnName, string NBottomDataControlUniqueID)
        {
            sNBottomDataColumnName = NBottomDataColumnName.Split(Convert.ToChar(","));
            sNBottomDataControlUniqueID = NBottomDataControlUniqueID.Split(Convert.ToChar(","));
            nColItem = sNBottomDataColumnName.Length;
            iColumnWidth = ColumnWidth;
            sCellHorizontalAlign = "Center";
        }
       
        public void InstantiateIn(System.Web.UI.Control container)
        {
            Table table = new Table();
            table.Width = Unit.Pixel(iColumnWidth);

            TableRow row1 = new TableRow();
            for (int i = 0; i < nColItem; i++)
            {
                //lControl = new LiteralControl();
                lControl = new HyperLink();
                lControl.ID = sNBottomDataControlUniqueID[i].Trim();
                lControl.Text = sNBottomDataColumnName[i].ToString().Trim();
                lControl.DataBinding += new EventHandler(lControl_DataBinding);

                TableCell cell = new TableCell();
                cell.HorizontalAlign = HorizontalAlign.Center;
                cell.VerticalAlign = VerticalAlign.Top;
               

                cell.Width = iColumnWidth / nColItem;
                cell.Controls.Add(lControl);
                row1.Cells.Add(cell);
            }
            table.Rows.Add(row1);
            container.Controls.Add(table);
            container.Controls.Add(new LiteralControl("<br />"));
        }
        public void lControl_DataBinding(object sender, EventArgs e)
        {
           // LiteralControl l = (LiteralControl)sender;
            HyperLink l = (HyperLink)sender;
            GridDataItem container = (GridDataItem)l.NamingContainer;
            sBottomDataColumnName = l.Text.Trim();
            l.Text = ((DataRowView)container.DataItem)[sBottomDataColumnName].ToString();
            l.Target = "_blank";
            l.NavigateUrl = "http://www.google.com/search?hl=en&q=" + ((DataRowView)container.DataItem)[sBottomDataColumnName].ToString() + "&btnG=Google+Search";

        }

 

    }

Maria Ilieva
Telerik team
 answered on 20 Dec 2010
1 answer
95 views
Hey, i am using Rad Grid containing a column of type string having its AllowFilter="true".
I am facing a weird situation, when i try to write in the filter a specific value (it is the first value for that column in the grid), copy and pasted from grid values on that column and click contains.
The filter returns "no records to be displayed".
Although, if i tried it with any other value also contained in the grid it works fine.
i don't know why this is happening? 
Pavlina
Telerik team
 answered on 20 Dec 2010
1 answer
139 views
Hi,

I have radgrid. which have 170 record. but i have using paging and 15 record per page. when i give code into itemCommand

Radgrid1.items.Count =15 . how to get total count for this grid.

Thanks,
Dhamu.
Princy
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
82 views
In my table I have columns named Ques, Answer, ID, etc. If I want to display these question answers on my page using RadTreeView, how do I implement this ? Like I want the parent node in the TreeView to be the question and child node should be the answer. Any sample code for that in here ?
Nikolay Tsenkov
Telerik team
 answered on 20 Dec 2010
3 answers
229 views
Hello,

i am using a RadPanelbar in WebApplication to select a control to load, here is my code:

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.FindControl("RadPanelBar1") != null)
        {
          if ((RadPanelBar1.SelectedItem != null))
            {
                choiceActivity(RadPanelBar1.SelectedItem.Value);
            }
            else if (Page.FindControl("RadChart1") == null)
            {
                choiceActivity("cockpit");
            }
        }
    }
 
    public void MessageboxAnzeigen(string Inhalt)
    {
        string Script = "<script type=\"text/javascript\">alert('" + Inhalt + "')</script>";
        RegisterClientScriptBlock("WindowOpener", Script);
    }
 
    public void openActivity(String controlName)
    {
        RadAjaxPanel1.Controls.Clear();
        UserControl userControl = (UserControl)this.LoadControl(controlName);
        userControl.ID = "myUC";
        this.RadAjaxPanel1.Controls.Add(userControl);
    }
    protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e)
    {
        choiceActivity(e.Item.Value);   
    }
 
    protected void choiceActivity(String itemValue)
    {
        if (Page.FindControl("myUC") == null)
        {
            switch (itemValue)
            {
                case "stammdaten":
                    openActivity("Stammdaten.ascx");
                    break;
 
                case "kundenverwaltung":
                    openActivity("StammdatenCockpit.ascx");
                    break;
                     
                case "abrechnung":
                    openActivity("abrechnung.ascx");
                    break;
 
                case "tarife":
                    openActivity("tarife.ascx");
                    break;
 
                case "cockpit":
                    openActivity("cockpit.ascx");
                    break;
            }
        }
    }
    protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
    {
 
    }
}

In VS it works fine, but deployed on the Server (IIS 7 on Win 2008 R2) it only shows the "cockpit" control and i can't unterstand what could be the different between VS und and the Server. The RadPanelbar seems to loose his state by every click (if i open a item its closed after the automatic reload of the page).

Thank you for any help.

UPDATE: I added a RadMenu and have exactly the same problem.

UPDATE 2: I enabled "PersistStateInCookie" and now the Panelbar keeps expandend after the reload but it still doesn't add the control to the RadAjaxPanel.

Best regards
Patrick
Patrick Gruhn
Top achievements
Rank 1
 answered on 20 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?