Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/uy/public_html/wp-includes/functions.php on line 6114
Gridcontrol Satir Ekleme – Umut Yazılım - Ümit AYDIN

Gridcontrol Satir Ekleme

Gridcontrol Satir Ekleme

Bir adet datatable oluşturduktan sonra eklenecek kolonları datable e ekleyip DataRows ile yeni satırı ekleyebiliriz.

dt.Columns.Add(new DataColumn(“ID”, typeof(int)));
dt.Columns.Add(new DataColumn(“Stok Kodu”, typeof(string)));
dt.Columns.Add(new DataColumn(“Stok Adı”, typeof(string)));
dt.Columns.Add(new DataColumn(“Miktar”, typeof(double)));
dt.Columns.Add(new DataColumn(“Birim”, typeof(string)));
dt.Columns.Add(new DataColumn(“FiyatDoviz”, typeof(double)));
dt.Columns.Add(new DataColumn(“Para Birimi”, typeof(string)));
dt.Columns.Add(new DataColumn(“ToplamDoviz”, typeof(double)));
dt.Columns.Add(new DataColumn(“FiyatTL”, typeof(double)));
dt.Columns.Add(new DataColumn(“ToplamTl”, typeof(double)));

DataRow drs = null;
drs = dt.NewRow(); // datatable
drs[“ID”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“STOKID”].ToString();
drs[“Stok Kodu”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“ADI”].ToString();
drs[“Stok Adı”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“ADI”].ToString();
drs[“Miktar”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“MIKTAR”].ToString();
drs[“Birim”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“BIRIM”].ToString();
drs[“FiyatTL”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“FIYATTL”].ToString();
drs[“FiyatDoviz”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“FIYATDOVIZ”].ToString();
drs[“Para Birimi”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“DOVIZTUR”].ToString();
drs[“ToplamDoviz”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“TOPLAMDOVIZ”].ToString();
drs[“ToplamTl”] = SqlClass.dsGenel.Tables[“Orfiche”].Rows[i][“TOPLAMTL”].ToString();
dt.Rows.Add(drs);
gridControl1.DataSource = dt;

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir