I am using RadGridView. I insert datas to RadGirdView like this:
// I am using Lambda Expression to get datas from Database.
var o = _vt.persons;
radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
radGridView1.Columns.Clear();
radGridView1.Rows.Clear();
radGridView1.MasterTemplate.AllowAddNewRow =
false
;
radGridView1.Columns.Add(
new
GridViewDecimalColumn(
"No"
));
radGridView1.Columns.Add(
new
GridViewTextBoxColumn(
"Puanı"
));
radGridView1.Columns.Add(
new
GridViewTextBoxColumn(
"Sonuç"
));
radGridView1.Columns[0].Width = 8;
radGridView1.Columns[0].ReadOnly =
true
;
{
var enumerable = o.ToArray();
foreach
(var m
in
enumerable)
{
var r = radGridView1.Rows.AddNew();
r.Cells[0].Value = m.no;
r.Cells[0].Tag =
"no"
;
r.Cells[1].Value = m.puani;
r.Cells[1].Tag =
"puani"
;
r.Cells[2].Value = m.sonuc;
r.Cells[2].Tag =
"sonuc"
;
}
}
radGridView1.ClearSelection();
radGridView1.CurrentRow =
null
;
You knoew, when double-click on a cell, it forms to editable mode. You enter a new value an when you click anywhere on the form or click enter, new value appears in the cell. But when I lick anywhere on the form or click enter, I want to save new value to the database. For this, I am using CellEndEdit event, but I did not manage to save new value to database.
Kind regards,
Mehmet.