🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / C# DEVEXPRESS RMOS / GRİDCONTROLDE HÜCREYE DEĞER EKLEME VEYA ALMA ve ROW ekleme

1-) C# DEVEXPRESS RMOS - GRİDCONTROLDE HÜCREYE DEĞER EKLEME VEYA ALMA


 DEĞER ALMA
 string W_onay = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["CPWORK_RECNO"]).ToString();

 DEĞER EKLEME

public void AddRow()

{

try

{

gridView1.AddNewRow();

int rowHandle = gridView1.GetRowHandle(gridView1.DataRowCount);

if (gridView1.IsNewItemRow(rowHandle))

{

gridView1.SetRowCellValue(rowHandle, gridView1.Columns["GUNCEL"], "no");// yes no

                    gridView1.SetRowCellValue(rowHandle, gridView1.Columns["AD"], "Muşavir Tanımı V.10 12/12/2017");

}

}

catch (Exception ex)

{

throw new Exception(ex.Message);

}

}

 

2-) DEVEXPRESS DATAGRİDE ROW EKLEME 
 DataTable dt = new DataTable();

            dt.Columns.Add("GUNCEL");

            dt.Columns.Add("AD");

            this.gridControl1.DataSource = dt;

            gridView1.AddNewRow();

            int rowHandle = gridView1.GetRowHandle(gridView1.DataRowCount);

            if (gridView1.IsNewItemRow(rowHandle))

            {

                gridView1.SetRowCellValue(rowHandle, gridView1.Columns["GUNCEL"], "no");// yes no

                gridView1.SetRowCellValue(rowHandle, gridView1.Columns["AD"], "Neden Tanımı V.10 12/12/2017");

            }

1-) C# DEVEXPRESS RMOS - eğer bir alan integer ise yani numeric bu şekilde ekle
 dt.Columns["KACKATI"].DataType = System.Type.GetType("System.Decimal");

            this.gridControl1.DataSource = dt;

 2021 Ocak 18 Pazartesi
 491