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

Current Cell in GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

24439 Feb 3,2005 07:18 PM UTC Feb 4,2005 04:02 PM UTC WinForms 6
loading
Tags: GridControl
Liliana Faerman
Asked On February 3, 2005 07:18 PM UTC

Hello I have a grid with one column Datetime. If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. Who i take this? I make grid.currentcell.activate(row, column) but the control go to the next column. Help me. Thanks

Administrator [Syncfusion]
Replied On February 3, 2005 09:34 PM UTC

Hi Liliana, Put your validation code into a grid.CurrentCellValidating event handler and set e.Cancel = true if criteria are not met. You can either display a message there or set grid.CurrentCell.ErrorMessage to the mesage you want to display. Stefan >Hello >I have a grid with one column Datetime. >If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. >Who i take this? >I make grid.currentcell.activate(row, column) but the control go to the next column. >Help me. >Thanks

Liliana Faerman
Replied On February 4, 2005 12:07 AM UTC

Thanks a lot Stefan!!! >Hi Liliana, > >Put your validation code into a grid.CurrentCellValidating event handler and set e.Cancel = true if criteria are not met. > >You can either display a message there or set grid.CurrentCell.ErrorMessage to the mesage you want to display. > >Stefan > >>Hello >>I have a grid with one column Datetime. >>If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. >>Who i take this? >>I make grid.currentcell.activate(row, column) but the control go to the next column. >>Help me. >>Thanks

Liliana Faerman
Replied On February 4, 2005 01:08 PM UTC

Stefan, i have other problem with this. In grid.CurrentCellValidating i not have the date in a first pass, i have spaces. When the control go to next column and i back to the column prior and change the date, i have the old date. And the same with all type of data. The problem is i don''t have the date in the moment i need, is necessary beginedit & endedit or other method? Thanks for your risponse. >Hi Liliana, > >Put your validation code into a grid.CurrentCellValidating event handler and set e.Cancel = true if criteria are not met. > >You can either display a message there or set grid.CurrentCell.ErrorMessage to the mesage you want to display. > >Stefan > >>Hello >>I have a grid with one column Datetime. >>If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. >>Who i take this? >>I make grid.currentcell.activate(row, column) but the control go to the next column. >>Help me. >>Thanks

Liliana Faerman
Replied On February 4, 2005 01:46 PM UTC

Stefan, i have the date in the method CurrentCellAcceptedChanges, i can put e.cancel, but when i push the control go to the next column. I need the control stop in this column until the date or any data is verified correctly for me. Who is the problem or can i do this? Thanks >Stefan, i have other problem with this. >In grid.CurrentCellValidating i not have the date in a first pass, i have spaces. >When the control go to next column and i back to the column prior and change the date, i have the old date. >And the same with all type of data. >The problem is i don''t have the date in the moment i need, is necessary beginedit & endedit or other method? > >Thanks for your risponse. > >>Hi Liliana, >> >>Put your validation code into a grid.CurrentCellValidating event handler and set e.Cancel = true if criteria are not met. >> >>You can either display a message there or set grid.CurrentCell.ErrorMessage to the mesage you want to display. >> >>Stefan >> >>>Hello >>>I have a grid with one column Datetime. >>>If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. >>>Who i take this? >>>I make grid.currentcell.activate(row, column) but the control go to the next column. >>>Help me. >>>Thanks

Administrator [Syncfusion]
Replied On February 4, 2005 03:05 PM UTC

When you are inside CurrentCellValidating you can get the cell text from string text = grid.CurrentCell.Renderer.ControlText; you can parse this text with the DateTime.Parse routine and then analyzte that resulting date. Stefan >Stefan, i have the date in the method CurrentCellAcceptedChanges, i can put e.cancel, but when i push the control go to the next column. >I need the control stop in this column until the date or any data is verified correctly for me. > >Who is the problem or can i do this? > >Thanks > >>Stefan, i have other problem with this. >>In grid.CurrentCellValidating i not have the date in a first pass, i have spaces. >>When the control go to next column and i back to the column prior and change the date, i have the old date. >>And the same with all type of data. >>The problem is i don''t have the date in the moment i need, is necessary beginedit & endedit or other method? >> >>Thanks for your risponse. >> >>>Hi Liliana, >>> >>>Put your validation code into a grid.CurrentCellValidating event handler and set e.Cancel = true if criteria are not met. >>> >>>You can either display a message there or set grid.CurrentCell.ErrorMessage to the mesage you want to display. >>> >>>Stefan >>> >>>>Hello >>>>I have a grid with one column Datetime. >>>>If the date who input the operator is greater of march of 2006 i need send a MessageBox and the focus is in the current cell of the column Datetime and no in the next column. >>>>Who i take this? >>>>I make grid.currentcell.activate(row, column) but the control go to the next column. >>>>Help me. >>>>Thanks

Liliana Faerman
Replied On February 4, 2005 04:02 PM UTC

Thanks a lot Stefan, that is the solution. Function is beautiful!!!!! Best Regards

CONFIRMATION

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

;