I've got two separate questions:
1. I don't want the user to be able to set columns as freezable, but I'd like to be able to specify certain columns in the template to be frozen by default. Is there a property I can set on the column to do this in xaml? I couldn't find anything obvious.
2. When clicking on a row in the grid, I only want to select the row when certain cells within the row are clicked. What's the best way to achieve this?
1. I don't want the user to be able to set columns as freezable, but I'd like to be able to specify certain columns in the template to be frozen by default. Is there a property I can set on the column to do this in xaml? I couldn't find anything obvious.
2. When clicking on a row in the grid, I only want to select the row when certain cells within the row are clicked. What's the best way to achieve this?
5 Answers, 1 is accepted
0

Dan
Top achievements
Rank 1
answered on 29 Jun 2009, 07:00 AM
Don't worry about question 2 - I've figured it out. Here's the code if anyone is interested:
If there's a better way to do this let me know!
private bool SelectionChanging = false; |
private void JobListGrid_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e) |
{ |
if (!SelectionChanging && JobListGrid.CurrentCell != null && JobListGrid.CurrentCell.Column.Name != "JobNumber" |
&& JobListGrid.CurrentCell.Column.Name != "CallSheetImage") |
{ |
SelectionChanging = true; |
// Unselect the row and reselect the last row |
foreach (Record newRec in e.AddedRecords) |
{ |
newRec.IsSelected = false; |
} |
foreach (Record oldRec in e.RemovedRecords) |
{ |
oldRec.IsSelected = true; |
} |
SelectionChanging = false; |
} |
} |
If there's a better way to do this let me know!
0
Hello Dan,
You can set CanUserFreezeColumns to false and desired FrozenColumnCount to achieve this. Here is an example:
<telerik:RadGridView Name="RadGridView1" CanUserFreezeColumns="False" FrozenColumnCount="2" />
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can set CanUserFreezeColumns to false and desired FrozenColumnCount to achieve this. Here is an example:
<telerik:RadGridView Name="RadGridView1" CanUserFreezeColumns="False" FrozenColumnCount="2" />
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Dan
Top achievements
Rank 1
answered on 29 Jun 2009, 01:23 PM
Hi Vlad
Thanks for the reply!
Is it possible to have frozen columns at both the left and right hand side of the grid? In my case, I want to freeze the first two columns and the last column, and then allow the user scroll between the columns in the middle.
Thanks for the reply!
Is it possible to have frozen columns at both the left and right hand side of the grid? In my case, I want to freeze the first two columns and the last column, and then allow the user scroll between the columns in the middle.
0
Hello Dan,
Currently RadGridView does not support this however we will do our best to provide this as soon as possible.
Regards,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently RadGridView does not support this however we will do our best to provide this as soon as possible.
Regards,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Henri
Top achievements
Rank 1
answered on 05 Jan 2012, 02:49 PM
Hello,
Is there a way yet, to freeze columns on the right hand side of the RadGridView?
Is there a way yet, to freeze columns on the right hand side of the RadGridView?