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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event to use when user clicks on an item in Gridlist control

Thread ID:





69768 Nov 12,2007 10:18 AM UTC Nov 13,2007 01:12 PM UTC WinForms 2
Tags: GridControl
Asked On November 12, 2007 10:18 AM UTC

I have a requirement, wherein if the user clicks or selects an item in grid list control, the item is added in another grid control. I used SelectedValueChanged() event, but this also gets fired initially when data is bound to grid control.
Next i tried using Click() event. This works fine, but if user click anywhere (any free space) on grid control the selected value(if any) is added.
I want the item to be added only when a user clicks on a particular item.
Please find the attached sample application.


Jisha Joy [Syncfusion]
Replied On November 12, 2007 01:28 PM UTC

Hi Arun,

Thank you for posting query to us.

The mentioned behavior can be achieved by handling the Grid.CellClick event of GridListControl.
Here is the code snippets:

this.glcSample.Grid.CellClick += new GridCellClickEventHandler(Grid_CellClick);

void Grid_CellClick(object sender, GridCellClickEventArgs e)
clsData objDat = (clsData)glcSample.Items[e.RowIndex-1];


Please refer the modified sample in the link to illustrate this:

Please try this and let me know if this helps.


Replied On November 13, 2007 01:12 PM UTC

Hi Jisha
Thank you. It worked fine.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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