Hi Truong,
Thanks for the update.
We could able to understand your scenario. By default,GridListControl is used to display the datasource values and its cell’s type is “Static”. So GridListControl does not allowed to edit the cell values. If you want to change the cell text while clicking, QueryCellInfo event can be used ,but when current cell has lost focus, it retrieves the original value from underlying datasource. It is the default behaviour.
To change the cell value of the current cell, change or update that value in datasource. So that the changed value will reflects in GridListControl. Please make use of the below code.
Code example:
this.gridListControl1.Grid.CellClick += new GridCellClickEventHandler(Grid_CellClick);
int rowIndex;
string Column;
void Grid_CellClick(object sender, GridCellClickEventArgs e)
{
GridStyleInfo style = this.gridListControl1.Grid[e.RowIndex,e.ColIndex];
this.textBox1.Text = style.Text;
rowIndex = e.RowIndex;
Column = this.gridListControl1.Grid[0,e.ColIndex].Text;
}
private void btn_text_Click(object sender, EventArgs e)
{
//Save the value in datasource.
table.Rows[rowIndex][Column] = textBox1.Text;
}
Sample link:
Regards,
Piruthiviraj