Last column getting invisible when frozen the first two columns

9 posts, 0 answers
  1. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 08 Aug 2013 Link to this post

    Hi,
    I have one rad grid with 20 more columns, While i frozen the first two columns the last column will be in out of the grid..
    and i used to show full columns in grid with "UseStaticHeaders=True", Bcoz am getting different count of columns from DB when i show a grid.

    Can you anyone help me..?

    Thanks
    -Rk.Moorthy
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Aug 2013 Link to this post

    Hi Rk.Moorthy,

    When using frozen columns ,you have to make sure that the sum of the widths of the last column match the non-frozen columns,otherwise you might face such issues.
    I guess you might be setting widths to columns.Try changing the column widths.Try increasing the column width of the last column so that the content can be seen.

    Thanks,
    Princy
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 10 Aug 2013 Link to this post

    Hi Princy

    It Worked. But the last column is a Link button.

    If the link button is clicked a chart will appear. At that time the grid shrinks.

    If frozen is removed, this issue is not there.

    -Rk.Moorthy
  5. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 13 Aug 2013 Link to this post

    Hi,
    Can anyone help me regarding the above issue..?

    -Rk.Moorthy
  6. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 13 Aug 2013 Link to this post

    Hi Rk.Moorthy,

    Could you please elaborate more on this issue and specify how exactly do you implement this functionality and where the chart is rendered? If you provide your code, it will help us to track the issue and find a proper to your case solution.

    Regards,
    Venelin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  7. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 14 Aug 2013 Link to this post

    Hi Venelin ,
    I have a dynamic grid in a page. For grid "Columns and data" are coming from DB.
     <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Vista" AutoGenerateColumns="false"
                        OnItemDataBound="RadGrid2_ItemDataBound" OnNeedDataSource="RadGrid2_NeedDataSource"
                        OnPreRender="RadGrid2_PreRender" Height="400px" Width="1180px" OnItemCommand="RadGrid2_ItemCommand">
                        <MasterTableView HeaderStyle-HorizontalAlign="Center" DataKeyNames="MKTID" ClientDataKeyNames="MKTID"
                            HeaderStyle-Wrap="true" HeaderStyle-Height="45px" Width="97%">
                            <Columns>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings>
                            <Scrolling AllowScroll="true" UseStaticHeaders="false" FrozenColumnsCount="2"></Scrolling>
                            <Selecting AllowRowSelect="true" />
                            <ClientEvents OnColumnDblClick="myDblClickEvent" OnRowDblClick="RowSelectCheck" />
                        </ClientSettings>
                    </telerik:RadGrid>

    And also i have added another four columns in the same grid (ID: RadGrid2) like following in aspx.cs page.

        // Column : MININVESTMENT
                GridBoundColumn objBoundcol3 = new GridBoundColumn();
                objBoundcol3.HeaderText = "MININVESTMENT";
                objBoundcol3.UniqueName = "MININVESTMENT";
                objBoundcol3.DataType = typeof(string);
                objBoundcol3.DataField = "MININVESTMENT";
                objBoundcol3.HeaderStyle.Width = 100;
                objBoundcol3.HeaderStyle.Wrap = true;
                objBoundcol3.ItemStyle.Width = 100;
                objBoundcol3.ItemStyle.Wrap = true;
                objBoundcol3.Visible = true;
                RadGrid2.MasterTableView.Columns.Add(objBoundcol3);

        // Column : SORTORDER
                   GridBoundColumn objBoundcol = new GridBoundColumn();
                objBoundcol.HeaderText = "SORTORDER";
                objBoundcol.UniqueName = "SORTORDER";
                objBoundcol.DataType = typeof(string);
                objBoundcol.DataField = "SORTORDER";
                objBoundcol.HeaderStyle.Width = 100;
                objBoundcol.HeaderStyle.Wrap = true;
                objBoundcol.ItemStyle.Width = 100;
                objBoundcol.ItemStyle.Wrap = true;
                objBoundcol.Visible = false;
                RadGrid2.MasterTableView.Columns.Add(objBoundcol);

                // Column : MKTPRIORITY
                    GridBoundColumn objBoundcol2 = new GridBoundColumn();
                objBoundcol2.HeaderText = "MKTPRIORITY";
                objBoundcol2.UniqueName = "MKTPRIORITY";
                objBoundcol2.DataType = typeof(Int32);
                objBoundcol2.DataField = "MKTPRIORITY";
                objBoundcol2.HeaderStyle.Width = 100;
                objBoundcol2.HeaderStyle.Wrap = true;
                objBoundcol2.ItemStyle.Width = 100;
                objBoundcol2.ItemStyle.Wrap = true;
                objBoundcol2.Visible = false;
                RadGrid2.MasterTableView.Columns.Add(objBoundcol2);
                
        // Column : Reach Curve
                    GridButtonColumn btnReachCurve = new GridButtonColumn();
                RadGrid2.MasterTableView.Columns.Add(btnReachCurve); //Add Here
                btnReachCurve.HeaderText = "View ReachCurve";
                btnReachCurve.UniqueName = "ReachCurve";
                btnReachCurve.DataType = typeof(string);
                btnReachCurve.CommandName = "ReachCurve";
                btnReachCurve.ButtonType = GridButtonColumnType.LinkButton;
                btnReachCurve.HeaderStyle.Wrap = true;
                btnReachCurve.HeaderStyle.Width = 100;
                btnReachCurve.ItemStyle.Width = 100;
                btnReachCurve.ItemStyle.HorizontalAlign = HorizontalAlign.Center;     
                btnReachCurve.Text = "View";
                btnReachCurve.Display = true;

    Here I am showing MININVESTMENT and Reach curve(Link Button) column only in the grid(RadGrid2),
    If i click the ReachCurve link button the chart will render under the grid.
    I have to frozen the first column in the grid.. It wont happen..

    Thanks
    -Rk.Moorthy

  8. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 14 Aug 2013 Link to this post

    Hi Venelin ,
    If i put UseStaticHeaders="true" in ClientSettings in grid..
    After that If i click "ReachCurve link button" in the grid for Render chart, The chart will be come But at the time the grid is shrinks..

    -Rk.Moorthy

  9. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 19 Aug 2013 Link to this post

    Hi Rk.Moorthy,

    Could you please try the following solution:

    ASPX:

    <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Vista" AutoGenerateColumns="false" CssClass="MyRadGrid" OnItemDataBound="RadGrid2_ItemDataBound" OnNeedDataSource="RadGrid2_NeedDataSource" OnPreRender="RadGrid2_PreRender" Height="400px" Width="1180px" OnItemCommand="RadGrid2_ItemCommand">

    CSS:

    .MyRadGrid{
       width: 1180px !important;
    }


    Please also note that when using frozen columns you must set UseStaticHeaders="true".

    If this doesn't help please provide more information, especially relevant to the case would be how the part with the link button is implemented and where the chart is rendered, and in which browser does the issue appear.

    Regards,
    Venelin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  10. Rk.MooRthy(DLL Version : 2008.3.1314.35)
    Rk.MooRthy(DLL Version : 2008.3.1314.35) avatar
    21 posts
    Member since:
    Jun 2013

    Posted 19 Aug 2013 Link to this post

    Hi Venelin,
    Its working fine.. Thanks for your reply.
    and also i put HeaderStyle-Height="45px" HeaderStyle-Width="100px" in MasterTableView in grid.

    Thanks
    -Rk.MooRthy
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017