Rieni De Rijke
Top achievements
Rank 1
Rieni De Rijke
asked on 15 Sep 2010, 12:27 PM
I want to find out if one of the cells/rows in my GridView is in EditMode.
I tried this, but it didn't work:
Is there a simple way to find out if my grid is in editmode?
I tried this, but it didn't work:
private bool GridInEditModus()
{
foreach (var row in myGrid.Items)
{
if (((GridViewRow)row).IsInEditMode)
{
return true;
}
}
return false;
}
Unable to cast object of type 'Cars.Infrastructure.Car' to type 'Telerik.Windows.Controls.GridView.GridViewRow'.Is there a simple way to find out if my grid is in editmode?
4 Answers, 1 is accepted
0
Hi Rieni De Rijke,
Yavor Georgiev
the Telerik team
You are probably looking for the IsInEditMode property of RadGridView.
Greetings,Yavor Georgiev
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
Rieni De Rijke
Top achievements
Rank 1
answered on 15 Sep 2010, 12:32 PM
<<You are probably looking for the IsInEditMode property of RadGridView.>>
Hmm... my RadGridView does not have such a property.
Hmm... my RadGridView does not have such a property.
0
Hello Rieni De Rijke,
and then check the value of the isGridInEditMode flag.
Sincerely yours,
Yavor Georgiev
the Telerik team
Please accept my apologies, I mixed up the control versions. What you can do is:
private
bool
isGridInEditMode =
false
;
private
void
grid_BeginningEdit(
object
sender, GridViewBeginningEditRoutedEventArgs e)
{
this
.isGridInEditMode =
true
;
}
private
void
grid_RowEditEnded(
object
sender, GridViewRowEditEndedEventArgs e)
{
this
.isGridInEditMode =
false
;
}
Sincerely yours,
Yavor Georgiev
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
Rieni De Rijke
Top achievements
Rank 1
answered on 15 Sep 2010, 12:45 PM
Yes, I know that one can use grid_BeginningEdit and grid_EndEdit.
But I thought that there maybe was a simple way to check if the grid is in EditMode without using a bool or
Beginning/End Edit.
But I thought that there maybe was a simple way to check if the grid is in EditMode without using a bool or
Beginning/End Edit.