Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is my code. I need display data in other dgvIew when moving into rows. I tired key up , key down, selectiopn changed etc. On selection changed it work but when i move into other row old was't cleared or fill properly. Any suggestion please?


private void OsveziNormativ()
{

DataGridViewCell cell = dgvModeli.CurrentCell;
if (cell != null)
{
DataGridViewRow red = cell.OwningRow;
if (this.redModeli != red)
{
ModelCosort stavka = (ModelCosort)red.DataBoundItem;

//
normativStavki.Clear();

if (stavka != null)
{
// MessageBox.Show(stavka.Model);

normativStavki = BL.BL.Stavki(stavka.Model);
dgvNalog.DataSource = normativStavki;
redModeli = red;


OznaciSoCrveno();
}
}
}
Posted
Comments
Sinisa Hajnal 1-Sep-15 6:26am    
Try using RowEnter (or is it just Enter) property - it will cover all kind of row entering, via keyboard, mouse or thought.

Također, možda pomogne ako na početku svakog ulaska počistiš target view tako da nemaš zaostalih vrijednosti. ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900