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

GridView and FullColumnSelection

1 Answer 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 12 Feb 2009, 12:16 PM
hello experts,

My question is the following related to RAD gridview:
 It is possible that i have a full selection on column when I click a certain cell
from that column?
Tks, all the best!!!

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 12 Feb 2009, 01:00 PM
Hello Ken,

Thank you for this question.

Currently RadGridView does not implement column selection. We will add this feature in one of our upcoming releases. However, you could process the CellFormatting event and format cells to simulate selection.

The following code uses the IsCurrentColumn property to check whether the cell should paint its background in yellow:

void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) 
    if (e.CellElement.RowElement is GridDataRowElement) 
    { 
        if (e.CellElement.IsCurrentColumn) 
        { 
            e.CellElement.DrawFill = true
            e.CellElement.BackColor = Color.Yellow; 
            e.CellElement.GradientStyle = GradientStyles.Solid; 
        } 
        else 
        { 
            e.CellElement.DrawFill = false
        } 
    } 


I hope this helps. Please feel free to contact us if you have other questions.

Greetings,
Jack
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Ken
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or