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

Data validation in DataBound Grid

1. I have a DataBoundColumn with a TextFormat control linked to a decimal field in a dataset. I am able to restrict entry to single decimal place numeric using the styleinfo, but can''t get rid of the DBNull error message that appears if I type the delete key and then try to leave the field. How can I best deal with this, do I have to handle an event or is there a simpler way just using the designer? 2. My application updates other columns in the same row in a datatable based on entry into specific columns. The result of this is not reflected in the grid until I leave the row. How can I force the grid to update when I leave a cell rather than just the row?

3 Replies

PN Patrick Noble May 16, 2004 03:38 AM

OK, I see the answer to 2 in another post, use grid.binder.endedit. Just need help with 1 now. >1. I have a DataBoundColumn with a TextFormat control linked to a decimal field in a dataset. I am able to restrict entry to single decimal place numeric using the styleinfo, but can''t get rid of the DBNull error message that appears if I type the delete key and then try to leave the field. How can I best deal with this, do I have to handle an event or is there a simpler way just using the designer? > >2. My application updates other columns in the same row in a datatable based on entry into specific columns. The result of this is not reflected in the grid until I leave the row. How can I force the grid to update when I leave a cell rather than just the row? > >


AD Administrator Syncfusion Team May 16, 2004 06:24 PM

What version of our code are you using? In the sample below, using 2.0.5.1, I do not see a problem pressing the delete key to empty a decimal cell. What are you doing differently? WindowsApplication2_9386.zip


PN Patrick Noble May 17, 2004 01:39 AM

My fault. Too embarassed to explain it. >What version of our code are you using? In the sample below, using 2.0.5.1, I do not see a problem pressing the delete key to empty a decimal cell. > >What are you doing differently? > >WindowsApplication2_9386.zip > >

Loader.
Live Chat Icon For mobile
Up arrow icon