[ GeniXmeN @ 25.02.2008. 00:33 ] @
Nadam se da nije problem zasto je na ENG zasto nemam bs puno vremena cekao sam odgovor i na neki drugi forumi i zato.nadam se da ce ti mi pomoci sta pre u vezu sa ovo.


I have some problem when i try to add new row to the datagrid. On my form i have buttons for Add,Edit,Delete,Save,Cancel how and DataGrid for showing the data. So when i click on the button for adding new data the new row is created in the DataGrid but the problem is after i click on the button the data in the row which was selected is disappear. What wrong i'm doing. The code for adding new row in the DataGrid that i use is
(Toggle Plain Text)

private void btnNovClen_Click(object sender, EventArgs e)
{
this.tblDetalnaBindingSource.AddNew();
}

so is it this ok or i must do something else.

Pls help me about this problem i'm waiting you answer!!!
[ mmix @ 25.02.2008. 14:19 ] @
Which button do you click to cause row dissapearance and what's that button's code? You didnt specify.

[ GeniXmeN @ 25.02.2008. 16:04 ] @
pa kad clicknes na Add ili kako sam ja dao ime Dodaj Nov to se desava a sve ostalo ok radi.
[ mmix @ 25.02.2008. 16:52 ] @
Cekaj, kad kliknes DVAPUT na dodaj nov onda se izgubi red koji je napravljen pri prvom kliku? Jel to?

Ako je to problem, moras prvo da izadjes iz edit moda pre nego pozoves AddNew, tj stavi ovaj kod u button handler:


Code:

private void btnNovClen_Click(object sender, EventArgs e)
{
this.tblDetalnaBindingSource.EndEdit(); 
this.tblDetalnaBindingSource.AddNew(); 
}
[ GeniXmeN @ 26.02.2008. 18:38 ] @
hvala za pomoc ok je sada