We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

HOW TO GET VALUE FROM A CURRENT CELL OF GRIDLISTCONTROL

I HAVE A GRIDLISTCONTROL WITH TWO COLUMN LOAD DATA FROM DATABASE , AND I WANT GET VALUE FROM CURRENT CELL TO A TEXTBOX WHEN CLICK ON A CELL WITH EVENT gridListControl_Click. HOW TO GET VALUE OF EACH COLUMN OF CURRENT CELL.

THANK SO MUCH

1 Reply

PM Piruthiviraj Malaimelraj Syncfusion Team November 9, 2016 09:21 AM UTC

Hi Truong, 

Thanks for your interest in Syncfusion products. 

In order to  get the current cell value while clicking on the cell , CellClick event of the GridListControl can be used. In that event, the cell value can be get by using GridStyleInfo of that current cell. Please make use of the below code, 
 
Code example: 
this.gridListControl1.Grid.CellClick += Grid_CellClick; 
void Grid_CellClick(object sender, GridCellClickEventArgs e) 
    GridStyleInfo style = this.gridListControl1.Grid.Model[e.RowIndex, e.ColIndex]; 
    MessageBox.Show("Cellvaue:" + style.CellValue.ToString()); 

Sample link: 

Regards, 
Piruthiviraj 


Loader.
Up arrow icon