Hello.
I have a qustion and need help.
I used GridDataBoundGrid and datasource is
BindingList.
At the GridDataBoundGrid, When I touched the last row and type something, (add new data and type only one or two colums)and touch the textbox or button,
the contents at the last row are gone.
If I didn't use
"public event PropertyChangedEventHandler PropertyChanged;" at User Class,
It didn't happen.
I want to use PropertyChangedEventHandler
and add row.
Can you give an advice, please.
Please, check attatched file .
Thank you .
NA
Nisha Arockiya A
Syncfusion Team
November 27, 2008 11:36 AM UTC
Hi Chin,
Sorry for the delay in responding.
The above mentioned issue is caused due to binding nature of the NewRow in the BindingList DataSource of GridDataBoundGrid.Here is a workaround that solves this issue.Please refer to it.
//Subscribe this event
this.gridDataBoundGrid1.CurrentCellEditingComplete += new System.EventHandler(this.gridDataBoundGrid1_CurrentCellEditingComplete);
private void gridDataBoundGrid1_CurrentCellEditingComplete(object sender, EventArgs e)
{
bl.AddNew();
bl.AllowNew = false;
}
Please try this and let me know if this serve your needs.
Regards,
Nisha
HL
Hyung-Jin Lee
November 29, 2008 09:40 AM UTC
Thank you very much.
This is what I need. ^^
HL
Hyung-Jin Lee
November 30, 2008 12:23 AM UTC
Hello. Nisha
Thank you for your help,
but if I add below code,
private void gridDataBoundGrid1_CurrentCellEditingComplete(object sender, EventArgs e)
{
ct.users.AddNew();
ct.users.AllowNew = false;
}
whenever I click any cell, new row is added.
So ... is there any way to stop it ?