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

Problem with Event Order

Hi, I am handling a checkbox click on a databoundgrid (GridDataBoundGrid1.CheckBoxClick). If the checkbox is clicked I default values in other cells to 0: Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) ''If the checkbox is deselected then we need to blank all the Commit values. If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" End If My problem is that if the last cell that I was edditing before clicking the checkbox needs to be defaulted then it fails else it works. Thanks Iain

7 Replies

AD Administrator Syncfusion Team January 7, 2005 10:09 AM

Try adding a call to ResetVolatileData to see if that helps. Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) grid.ModelResetVolatileData() If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0"


IA Iain January 10, 2005 02:39 AM

Hi Clay, Thanks for the fast response. I do not have the method "ResetVolatileData". Thanks Iain >Try adding a call to ResetVolatileData to see if that helps. > >Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) >grid.ModelResetVolatileData() >If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then >grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" >


IA Iain January 10, 2005 02:40 AM

Sorry.... I have found it now...Just checking to see that it works. Thanks Iain >Hi, >I am handling a checkbox click on a databoundgrid (GridDataBoundGrid1.CheckBoxClick). If the checkbox is clicked I default values in other cells to 0: > >Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) > ''If the checkbox is deselected then we need to blank all the Commit values. > If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then > grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" > > End If > >My problem is that if the last cell that I was edditing before clicking the checkbox needs to be defaulted then it fails else it works. > >Thanks > >Iain >


IA Iain January 10, 2005 02:45 AM

Hi again, I have found and tried this method but it still does not work. Thanks Iain >Hi, >I am handling a checkbox click on a databoundgrid (GridDataBoundGrid1.CheckBoxClick). If the checkbox is clicked I default values in other cells to 0: > >Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) > ''If the checkbox is deselected then we need to blank all the Commit values. > If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then > grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" > > End If > >My problem is that if the last cell that I was edditing before clicking the checkbox needs to be defaulted then it fails else it works. > >Thanks > >Iain >


IA Iain January 11, 2005 03:34 AM

Hi Clay, Have you any ideas on this one. I tried: Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) grid.DataBoundGridModel.ResetVolatileData() Cheers Iain >Hi again, > >I have found and tried this method but it still does not work. > >Thanks > >Iain > >>Hi, >>I am handling a checkbox click on a databoundgrid (GridDataBoundGrid1.CheckBoxClick). If the checkbox is clicked I default values in other cells to 0: >> >>Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) >> ''If the checkbox is deselected then we need to blank all the Commit values. >> If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then >> grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" >> >> End If >> >>My problem is that if the last cell that I was edditing before clicking the checkbox needs to be defaulted then it fails else it works. >> >>Thanks >> >>Iain >>


AD Administrator Syncfusion Team January 11, 2005 04:34 AM

Can you upload a sample project showing the problem, or create a Direct Trac support incident with a sample project?


IA Iain January 11, 2005 09:18 AM

Hi Clay, I seem to have got around this by using grid.DataBoundGridModel.ConfirmPendingChanges() Thanks for all the help Iain >Hi, >I am handling a checkbox click on a databoundgrid (GridDataBoundGrid1.CheckBoxClick). If the checkbox is clicked I default values in other cells to 0: > >Dim grid As GridDataBoundGrid = CType(sender, GridDataBoundGrid) > ''If the checkbox is deselected then we need to blank all the Commit values. > If CType(grid.Model.Item(e.RowIndex(), e.ColIndex()).Text, Boolean) = True Then > grid.Model.Item(e.RowIndex(), e.ColIndex() + 1).Text = "0" > > End If > >My problem is that if the last cell that I was edditing before clicking the checkbox needs to be defaulted then it fails else it works. > >Thanks > >Iain >

Loader.
Live Chat Icon For mobile
Up arrow icon