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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

HOW TO GET VALUE FROM A CURRENT CELL OF GRIDLISTCONTROL

Thread ID:

Created:

Updated:

Platform:

Replies:

127331 Nov 9,2016 02:47 AM UTC Nov 9,2016 09:21 AM UTC Windows Forms 1
loading
Tags: GridListControl
Truong
Asked On November 9, 2016 02:47 AM UTC

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

Piruthiviraj Malaimelraj [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;