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

Getting the Rowindex

Thread ID:

Created:

Updated:

Platform:

Replies:

54504 Jan 10,2007 11:08 AM UTC Jan 10,2007 12:26 PM UTC Windows Forms 4
loading
Tags: GridControl
leemarose
Asked On January 10, 2007 11:08 AM UTC

Hi,


How to get the rowindex for row while clicking disabled column of that particular row.

is it possible?

Ragards.

Leema

Administrator [Syncfusion]
Replied On January 10, 2007 11:22 AM UTC

Hi Leema,

You can handle the MouseClick event of the grid and use PointToRowCol method to get the rowIndex and colIndex of the clicked cells in a grid. Here is a code snippet.

//Form load event handler
this.gridDataBoundGrid1.MouseClick += new MouseEventHandler(gridDataBoundGrid1_MouseClick);

void gridDataBoundGrid1_MouseClick(object sender, MouseEventArgs e)
{
GridDataBoundGrid grid = sender as GridDataBoundGrid;
int row, col;
grid.PointToRowCol(new Point(e.X, e.Y),out row,out col);
Console.WriteLine("Clicked CellPos {0},{1}", row, col);
}

Best Regards,
Haneef

leemarose
Replied On January 10, 2007 11:31 AM UTC

hi haneef!

I dont have mouseclick event in griddataboundgrid

grid.

what to do? any other suggestions.

regards,
leema

Administrator [Syncfusion]
Replied On January 10, 2007 11:53 AM UTC

Hi Leema,

The MouseClick event only available in the .Net 2.0. Try handling the MouseDown event of the grid. Please refer to the attached sample for implementation.

Sample : GDBGEnaledClick.zip

Best Regards,
Haneef

leemarose
Replied On January 10, 2007 12:26 PM UTC

Hi hannef!

it worked out.

thanks a lot.

regards..

Leema


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

;