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

Getting element value 'null' after pressing down key

Hi,
I am using GridGrouping Control.
I have 'TableControlCurrentCellEditingComplete' event of that grid.
When I change any column value and press 'Enter' key, I get the element having all column values.
But when I press 'Down Arrow' Key, I get null element.
Is there any other method to get element or record at 'Down Arrow' key? 

Regards,
Rasika

1 Reply

NK Neelakandan Kannan Syncfusion Team March 10, 2015 06:46 PM UTC

Hi Rasika,

 

Thank you for your interest in Syncfusion products.

 

If you want to get the display element or record while clicking the “Down Arrow” button, you can use TableControlCurrentCellKeyDown event. Using this event, you can get the record by accessing DisplayElement. Please make use of below code and attached sample,

 

Code Snippet:

this.gridGroupingControl1.TableControlCurrentCellKeyDown += new GridTableControlKeyEventHandler(gridGroupingControl1_TableControlCurrentCellKeyDown);           

 

void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)

        {

            if (e.Inner.KeyCode == Keys.Down)

            {

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

                Record record = style.TableCellIdentity.DisplayElement.GetRecord();

            }

        }

 

Please me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_DisplayElement_1ec35d20.zip

Loader.
Live Chat Icon For mobile
Up arrow icon