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

Grid Grouping Control Click to cell

Hi, I am having some problem on clicking the cell and perform an action. Hope that support team can help me.

What I want is click on particular cell, then perform a statement. It should able to get others cell value which same row with the clicked cell. 

I try to use following events, when i click on the certain cell, it prompt few times of messagebox, which will execute the statement few times, may I how to prevent this? Thank you !!

gridgroupcontrol.TableControlCellClick += gridgroupcontrol_TableControlCellClick;

void gridgroupcontrol_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
        {

            GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);

            if (style != null && style.TableCellIdentity != null && style.TableCellIdentity.DisplayElement != null && style.TableCellIdentity.DisplayElement.GetRecord() != null && style.TableCellIdentity.Column != null)
            {
                if (style.TableCellIdentity.Column.Name == "Age")
                {
                    MessageBox.Show("AGE");
                }
                else if (style.TableCellIdentity.Column.Name == "Group")
                {
                    MessageBox.Show("GROUP");
                }
            }
        }

3 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team October 17, 2016 09:43 AM UTC

Hi Falcon, 

Thanks for your interest in Syncfusion products. 

We had analyzed your reported scenario and created the simple sample as per your scenario. Unfortunately , we could not able to reproduce the issue at our end. Could you please provide us with the following details, 

·         Please let us know the SyncfusionEssentialStudio build version details that you have using in your projects. 
·         Please ensure the reported issue is reproduced in attached sample. 
·         Please provide us with screen shots or video which replicates the your scenario. 
·         Please modify the attached sample with your customization if we missed anything. 

These would be more useful for us to provide the exact solution at the earliest. Please refer to attached video file, 

Sample link: 
 
Sample video: 

Regards, 
Piruthiviraj 



FC Falcon CK October 17, 2016 01:32 PM UTC

Hi, I've double checked my code, it is maybe because it fire few times the event, so it run few times... Now the problem has been resolved, but when data alot, maybe 300 rows , it move slow, when I click to the cell it takes about 2 second only able to run the statement. 

Can you give me some suggestion on how to optimize it , thank you !!


PM Piruthiviraj Malaimelraj Syncfusion Team October 18, 2016 12:14 PM UTC

Hi Falcon, 

Thanks for the update. 

We had analyzed your query and tested the grid with many records. We could not able to reproduce the issue at our end. We suspect that the issue may be occurred by your application customizations. Could you please provide us with below details, 

·         In our previous sample, we have used TableControlCellClick event alone to get the cell style. Please let us know if you have any customization regarding current cell changes or other than TableControlCellClick event customization. If yes, can you show the code snippet or modify the sample to reproduce. 
·         Please provide us with sample video of your application which replicates your scenario. 

These would be more useful for us to provide the exact solution at the earliest. 

Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon