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

EndEdit Focus issue

Thread ID:





39283 Jan 3,2006 05:29 PM UTC Jan 4,2006 06:35 PM UTC WinForms 4
Tags: GridControl
Mike Nohr
Asked On January 3, 2006 05:29 PM UTC

I''m trying to force an update of the underlieing dataset in a databoundgrid so I can perform some pre-event validation. The issue i''m having is that when I call this.grid.Binder.EndEdit(); this.grid.CurrentCell.EndEdit(); the focus is lost from the cell that currently has focus and focus is set to the first cell in the grid. I need a way to persist the data in the current cell and keep focus on that cell. Is there any way to achieve this? Cheers

stanleyj [Syncfusion]
Replied On January 3, 2006 05:56 PM UTC

Hi Mike, If BeginEdit is called after update, will that work for you. this.grid.Binder.BeginEdit(); this.grid.CurrentCell.BeginEdit(); I do not see the currentcell focus being moved to first cell. What version of grid are you using? Best regards, Stanley

Mike Nohr
Replied On January 3, 2006 06:15 PM UTC

This is the code i''m using: this.gdgMessages.Binder.BeginEdit(); this.gdgMessages.Binder.EndEdit(); this.gdgMessages.CurrentCell.BeginEdit(); this.gdgMessages.CurrentCell.EndEdit(); This seems to have resolved the changing of focus however it only seems to update the underlieing dataset on fields with checkboxes. The problem is that I have a text entry field if I type something new in that field without leaving that field I can''t seem to persist that data to the dataset. The above code doesn''t appear to achieve this. Any suggestions? I''m using grid

stanleyj [Syncfusion]
Replied On January 4, 2006 09:30 AM UTC

Hi Mike, Try this way. this.gridDataBoundGrid1.CurrentCell.EndEdit(); this.gridDataBoundGrid1.Binder.EndEdit(); this.Adapter.Update(this.DataSet); this.gridDataBoundGrid1.Binder.BeginEdit(); this.gridDataBoundGrid1.CurrentCell.BeginEdit(); Let me know if you still find issues. Best regards, Stanley

Mike Nohr
Replied On January 4, 2006 06:35 PM UTC

Thanks Stanley! Worked like a charm. One more question for ya... If I wanted to persist an entire rows worth of data instead of just a cell what might the syntax for that look like? Cheers Mike


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

This page will automatically be redirected to the 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