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
close icon

HOW CAN I GET THE VALUE OF A CELL, IN A ROW SELECTED IN GRIDDATABOUND CONTROL?

HELLO Syncfusion. 
I´M GRIDDATABOUND FILLING WITH A DATASET, AND I NEED TO GET THE VALUE OF A CELL OF USER SELECT ROW. 

THANKS AND GREETINGS.

3 Replies

MS Maniratheenam Sehar Syncfusion Team July 18, 2014 05:18 PM UTC

Hi Juan Zavala,

 

Thank you for your interest in Syncfusion Products.

 

We would like to let you know that the reported query can be resolved just by use of below code snippet,

 

CodeSnippet:

 

GridCurrentCell cc = this.GridDataBoundGrid1.CurrentCell;

int rowIndex = cc.RowIndex;

 

 

For your better convenience, we have added a sample below,

http://www.syncfusion.com/downloads/support/directtrac/general/GDBC-Sample-1345162240.zip

 

Please let us know, if you have any further concerns.

 

Regards,

ManiRatheenam S



JZ Juan Zavala July 21, 2014 10:31 PM UTC

HELLO SYNCFUSION. 
FIRST, THANK YOU FOR YOUR PROMPT REPLY, MUCH SERVED ME, NOW I DOUBT THAT CAME WHEN CAN GET ANY CELL VALUE OF SELECTED ROW INSIDE AND NOT ONLY ROWINDEX, BUT, FOR EXAMPLE THE VALUE OF CELL WITH CONTENTS 3 OR THE NAME "NOMINAID". 

THANKS && REGARDS.


MS Maniratheenam Sehar Syncfusion Team July 22, 2014 07:49 AM UTC

Hi Juan Zavala,

 

Thanks for the update.

 

Query:

RowIndex with corresponding cell value

We would like to convey that your reported query can be achieved by codesnippet given below,

Codesnippet:

GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;

      int rowIndex = cc.RowIndex;

      int colIndex = cc.ColIndex;

 MessageBox.Show("Row Index=" + rowIndex + "" + "Column Index=" + colIndex + "" + "Cell Value=" + this.gridDataBoundGrid1[rowIndex, colIndex].Text);

 

Where “this.gridDataBoundGrid1[rowIndex, colIndex].Text” will get the value of the selected cell.

Moreover, for your better convenience, we’ve added a sample below,

http://www.syncfusion.com/downloads/support/directtrac/general/CellValue2002924064.zip

 

 

Please let us know, if you have any further concerns.

 

Regards,

ManiRatheenam S


Loader.
Live Chat Icon For mobile
Up arrow icon