hi all,
i am using the template fixed addonrow at top ....... the problem is whenever user input partial data ..the row gets added to the existing collections ... i want to prevent this plz help out ..
hi bkimmelca,
i have handled this sort .. n the solution is ..
1. set update mode to - on cellchange or lost focus
2. use a BeforeCellDeactivate event within this validate the cell value ..
if not .. use this code to set the cell to edit mode ..
e.Cancel = True
grdMData.PerformAction(UltraGridAction.EnterEditMode)
3. use BeforeRowUpdate event
and check for the cell values ..if not .
hppy coding .
I am having precisely the same issue as indicated above. I have an add row at the top of the grid. I am handling the BeforeCellUpdate event to validate the data in the row when it is changed (including when data in the add row is changed), and setting e.Cancel = True if the data is not valid. However, a new, empty row is inserted into the underlying data source before any cells are updated (and therefore before "BeforeCellUpdate" is called). What I want is for the add row not to add anything to the data source until the row is complete (i.e, when the user hits the enter key on the row), so that I can validate what is about to be entered before anything is added to the underlying data source.
csearun2002 said:but mike ...the empty row gets added to the collection of existing rows a... any wasy to prevent this
but mike ...the empty row gets added to the collection of existing rows a... any wasy to prevent this
I don't understand what you mean. What empty row?
Mike, can you provide a sample code to check all the cells in the previous row?