4 Answers, 1 is accepted
0
Accepted
Hi Andi,
Vlad
the Telerik team
Currently there is not such built-in feature however you can implement it very quickly if you declare for example a CheckBox in the column Header property and treat this column as "selected" if the CheckBox is checked. You can also assign different background for the "selected" columns - more info on this demo.
Best wishes,Vlad
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Andi
Top achievements
Rank 2
answered on 27 Jan 2011, 11:36 AM
Still one question.
How will I place a Checkbox into my Header? My Columns where defined by Runtime from Code:
How will I place a Checkbox into my Header? My Columns where defined by Runtime from Code:
private
void
AddGridViewDataColumn(
string
uniqueName,
bool
insert =
false
)
{
Binding bind =
null
;
if
(uniqueName !=
" "
)
{
bind =
new
Binding(uniqueName);
}
else
{
bind =
new
Binding(
"col1"
);
}
bind.Mode = BindingMode.TwoWay;
bind.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
GridViewDataColumn column =
new
GridViewDataColumn();
if
(uniqueName !=
" "
)
{
column.UniqueName = uniqueName;
}
else
{
column.UniqueName =
"col1"
;
}
column.Header = uniqueName;
// LocalizationManager.GetString(uniqueName);
column.DataMemberBinding = bind;
column.CellEditTemplate = (DataTemplate)FindResource(
"SyncToBoxTemplate"
);
if
(insert)
{
int
index = rgvEntscheidungstabelle.Columns.Count - 1;
this
.rgvEntscheidungstabelle.Columns.Insert(index, column);
}
else
{
rgvEntscheidungstabelle.Columns.Add(column);
}
}
0
Hi Andi,
Milan
the Telerik team
This help topic demonstrates how you can customize column headers.
Hope it helps.
Kind regards,Milan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0

Andi
Top achievements
Rank 2
answered on 27 Jan 2011, 01:42 PM
Thank you Milan.
For all who want's to add a Column with Checkbox in the Header by Runtime, this is the Code you can use (and make better):
For all who want's to add a Column with Checkbox in the Header by Runtime, this is the Code you can use (and make better):
StackPanel p =
new
StackPanel();
p.Orientation = Orientation.Horizontal;
CheckBox cb =
new
CheckBox();
cb.VerticalAlignment = System.Windows.VerticalAlignment.Center;
Label l =
new
Label();
l.Content = uniqueName;
p.Children.Add(cb);
p.Children.Add(l);
column.Header = p;