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

Edit cell of row selected

3 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
tuan
Top achievements
Rank 1
tuan asked on 07 Apr 2011, 07:24 AM
hi,

I have RadGridView, In event grvdata_SelectionChanging, I assign e.Cancel = true by any condition. And I only want edit on row selected, other row is not allow edit.

How do i do that?

Thanks

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Apr 2011, 08:10 AM
Hi tuan,

May you provide a bit more details about your particular scenario and the exact requirements?
Generally, you are allowed to edit only a single item at a time and this item will be selected on beginning editing it. Consequently, only the selected item will be edited. Which elements do you want to update and when exactly ? How do you handle the SelectionChanging event ?  

Kind regards,
Maya
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
tuan
Top achievements
Rank 1
answered on 07 Apr 2011, 08:45 AM
Hi Admin!

my scenario follow as:
    I have new, edit, save, undo button. when i click on edit button, variable FormStatus = "Edit" and then I only edit on Item Selected, Item UnSelect not edit.
    So, I want when click on row UnSelect and variable FormStatus = "Edit" , that row can not edit

void btnEdit_Click(object sender, RoutedEventArgs e)
{
            this.FormStaus = "Edit"
}
  
void grvdata_SelectionChanging(object sender, SelectionChangingEventArgs e)
{
            if (this.FormStaus == "Edit")
                e.Cancel = true;
}
0
Maya
Telerik team
answered on 08 Apr 2011, 10:07 AM
Hi tuan,

Unfortunately, it is still not completely clear what is the exact scenario you want to accomplish. Do you want to mark some items as editable during the selection and edit them once you click on the Edit button ? May you clarify the steps you want to take by describing the actions you want to take on each of them ? 
 

All the best,
Maya
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
Tags
GridView
Asked by
tuan
Top achievements
Rank 1
Answers by
Maya
Telerik team
tuan
Top achievements
Rank 1
Share this question
or