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

[Solved] Event in View Model

3 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Forest
Top achievements
Rank 1
Forest asked on 19 Oct 2010, 09:40 AM

 

 

Hi

I use ShowInsertRow in my GridView.
I wanna set some instructions when i'm adding a row by clicling on InsertRow button in my view Model.
How it is possible please ?

For the moment, I have this code in code Behind :

private
void MyGridView_AddingNewDataItem(object sender, GridViewAddingNewEventArgs e)

 

{

    //instructions
}

But i don't want it.
I need to manage the  AddingNewDataItem Even in my view Model.

Thanks

Mathieu

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 19 Oct 2010, 09:58 AM
Hello,

 This will invoke your object default constructor. You can use it to apply your additional code. 

Sincerely yours,
Vlad
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
Forest
Top achievements
Rank 1
answered on 19 Oct 2010, 10:13 AM
Hi

Thank you for your response.
You're right when you say that AddingNewDataItem event invokes the object default constructor.

But what about for MyGridView_RowEditEnded event for example ?

Thank you

Mathieu
0
Vlad
Telerik team
answered on 19 Oct 2010, 11:07 AM
Hello,

 Can you post more info what you want to do in this event?

Best wishes,
Vlad
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
Forest
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Forest
Top achievements
Rank 1
Share this question
or