This is a migrated thread and some comments may be shown as answers.

[Solved] Frozen Column demarcation line

2 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
cds_user
Top achievements
Rank 1
cds_user asked on 04 Jan 2010, 10:51 PM
I need to way to show where the Frozen column ends. For example is there a feature that will show a vertical bar or set the width of the right border of all the cells in the Frozen column.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jan 2010, 06:08 AM
Hello,

Set the border-right style for the corresponding column(for the column where the frozen column ends) in order to show the vertical bar.

CSS:
 
    <style type="text/css"
        .MyClass 
        { 
            border-right-color: Green !important; 
            border-right-width2px !important; 
            border-right-style: solid !important 
        } 
    </style> 

ASPX:
 
 <Columns>  
      <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID" 
                   UniqueName="CustomerID"
      </telerik:GridBoundColumn> 
      <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" 
                    UniqueName="CompanyName"
            <ItemStyle CssClass="MyClass" /> 
      </telerik:GridBoundColumn> 
          . . .  
The example shows setting style border style for second column when FrozenColumnCount set as 2.

You can also set the CssClass from code, if you are cresting columns dynamically, instead of setting style from ASPX.
CS:
 
    protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        GridColumn column = (GridColumn)RadGrid1.MasterTableView.Columns[(RadGrid1.ClientSettings.Scrolling.FrozenColumnsCount)-1]; 
        column.ItemStyle.CssClass = "MyClass"
    } 

-Shinu.
0
cds_user
Top achievements
Rank 1
answered on 05 Jan 2010, 04:15 PM
Thanks, it worked.
Tags
Grid
Asked by
cds_user
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
cds_user
Top achievements
Rank 1
Share this question
or