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

Current Cell in GridControl

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

6 Replies

AD Administrator Syncfusion Team 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


LF Liliana Faerman 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


LF Liliana Faerman 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


LF Liliana Faerman 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


AD Administrator Syncfusion Team 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


LF Liliana Faerman February 4, 2005 04:02 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon