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
close icon

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 03:09 PM UTC

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 07:39 AM UTC

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 07:40 AM UTC

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 07:45 AM UTC

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 08:34 AM UTC

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 09:34 AM UTC

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 02:18 PM UTC

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