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

Enter and Down Arroy key in grouping grid

I upgraded Grid Grouping control from 4.2.0.60 to 5.2.0.25. Enter key and DownArrow key used to work the same way. If cursor was on the top row, after Enter or DownKey AddNewRow will be added on the top, and row will be saved. Right now Enter Saves the row but not DownArroy key. How I can make them to work the same way?
I assume that after pressing any of those keys LeaveRecordCalled is fired.



else if.zip

3 Replies

AD Administrator Syncfusion Team December 14, 2007 09:32 AM UTC

You might try calling record.EndEdit() to see if that does what you need in your code.

But I could not see this problem using our latest 6.1 code. Here is the sample I used. I could enter a value in the top row in the GridGroupingControl, press the downarrow, and see it appear in the neighboring DataGridView.



WindowsApplication20.zip


NI Natalija Ilic December 14, 2007 06:05 PM UTC

Hi,
I tried your code but in 5.2 Grid because we are using that one (and I can’t use any other) and it didn't work. When I key in the grid and press Enter only the first column value appears in the GridView (which is not bed).
But if I key in the new row and press downarrow the values are still not in the GataView unless I start to key in the next new row in the grid. So it seems that the changes are not committed or saved in the table.
In my application the row state of record is “detached” after pressing downarrow, and “added” after pressing enter. How to change that and make the row state added when I press downarrow, I tried with e.TableControl.Table.EndEdit() in TableControlCurrentCellKeyDown when e.Inner.KeyData == Keys.Down but it didn't work.
private void gdInvoiceMatching_TableControlCurrentCellKeyDown( object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e )
{
switch ( e.Inner.KeyData )
{
//…………………………
case Keys.Down:
e.TableControl.Table.EndEdit();
break();
}
}
Can you please tell me what I can try next?


>You might try calling record.EndEdit() to see if that does what you need in your code.

But I could not see this problem using our latest 6.1 code. Here is the sample I used. I could enter a value in the top row in the GridGroupingControl, press the downarrow, and see it appear in the neighboring DataGridView.



WindowsApplication20.zip



AD Administrator Syncfusion Team December 15, 2007 12:26 AM UTC

I was able to avoid this problem in 5.2.0.25 by handling 2 events. Here is the sample back showing the events and the code.




WindowsApplication20.zip

Loader.
Live Chat Icon For mobile
Up arrow icon