3 Answers, 1 is accepted
0
Hello reema,
There is no API to lock selected item.
You can register for SelectionChanged event. On every change you should set the locked record.
Look at the following code:
All the best,
Jordan
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.
There is no API to lock selected item.
You can register for SelectionChanged event. On every change you should set the locked record.
Look at the following code:
| public Page() | |
| { | |
| InitializeComponent(); | |
| //Bind grid | |
| //Set selected item | |
| this.gridView.SelectedRecord = this.gridView.Records[0]; | |
| //Register for selection changed | |
| this.gridView.SelectionChanged += new EventHandler<SelectionChangeEventArgs>(gridView_SelectionChanged); | |
| } | |
| void gridView_SelectionChanged(object sender, SelectionChangeEventArgs e) | |
| { | |
| if (this.gridView.SelectedRecords.Count == 1 && this.gridView.SelectedRecords[0] == this.gridView.Records[0]) | |
| { | |
| return; | |
| } | |
| if (this.gridView.SelectedRecords.Count > 0) | |
| { | |
| this.gridView.SelectedRecords.Clear(); | |
| } | |
| this.gridView.SelectedRecord = this.gridView.Records[0]; | |
| } |
All the best,
Jordan
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
reema
Top achievements
Rank 1
answered on 28 Feb 2009, 10:40 AM
thx alot Jordan..
and how to change background color for the selected row..
thanx again..
0
Hello Reema,
RadGridView has a property called RowAppearance that can be used to define a new style for GridViewRow but unfortunately it does not work in the current version of RadGridView. This issue will be resolved in the incoming Q1 2009 release.
We are sorry for the inconvenience that this causes to you.
Regards,
Rosi
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.
RadGridView has a property called RowAppearance that can be used to define a new style for GridViewRow but unfortunately it does not work in the current version of RadGridView. This issue will be resolved in the incoming Q1 2009 release.
We are sorry for the inconvenience that this causes to you.
Regards,
Rosi
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.