Hi,
I have implemented the New row on my hierarchical grid. it works perfect. however when the user clicks on the new row, and new appears and when the user press Escape ONCE, the row edit mode is reverted but still the row still remains. If the user again press Escape the row disappears.
My requirement is, If its a new Row, if the user press once escape button, even if it had data or not, the new row should disappear and the grid should come to normal state.
Please advice.
I have implemented the New row on my hierarchical grid. it works perfect. however when the user clicks on the new row, and new appears and when the user press Escape ONCE, the row edit mode is reverted but still the row still remains. If the user again press Escape the row disappears.
My requirement is, If its a new Row, if the user press once escape button, even if it had data or not, the new row should disappear and the grid should come to normal state.
Please advice.
6 Answers, 1 is accepted
0
Hi David,
Would you please, share with us what kind of data source you are using to populate your RadGridView?
Kind regards,
Ivan Ivanov
the Telerik team
Would you please, share with us what kind of data source you are using to populate your RadGridView?
Kind regards,
Ivan Ivanov
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
Ravi
Top achievements
Rank 1
answered on 17 May 2011, 02:57 PM
I have model class. I populate the data into the model class and then assign the data to the datagrid by the ItemSource property.
0
Hi David,
What type of collection have you assigned to the ItemsSource property?
Kind regards,
Ivan Ivanov
the Telerik team
What type of collection have you assigned to the ItemsSource property?
Kind regards,
Ivan Ivanov
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
Ravi
Top achievements
Rank 1
answered on 17 May 2011, 03:03 PM
List<myClass>
0
Hi David,
You may try utilizing this approach:
Please, inform us if this solution meets your requirements.
Kind regards,
Ivan Ivanov
the Telerik team
You may try utilizing this approach:
public
MainPage()
{
InitializeComponent();
clubsGrid.CellEditEnded +=
new
EventHandler<GridViewCellEditEndedEventArgs>(clubsGrid_CellEditEnded);
}
void
clubsGrid_CellEditEnded(
object
sender, GridViewCellEditEndedEventArgs e)
{
if
(clubsGrid.ChildrenOfType<GridViewNewRow>().First().IsInEditMode)
clubsGrid.ChildrenOfType<GridViewNewRow>().First().CancelEdit();
}
Please, inform us if this solution meets your requirements.
Kind regards,
Ivan Ivanov
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
Ravi
Top achievements
Rank 1
answered on 18 May 2011, 03:25 AM
Hi,
Thanks for your valuable suggestion.
I tried the below code and its working.
Inheriting from
Thanks,
Thanks for your valuable suggestion.
I tried the below code and its working.
else if (key == Key.Escape)
{
commandsToExecute.Add(RadGridViewCommands.CancelRowEdit);
}
Inheriting from
DefaultKeyboardCommandProvider
Thanks,