How to check if filled ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey
I need to check if row in my typed dataset is filled or not. I create a new
row, and data to this row will be sent from datagrid. Then user click save
button. But this button will be disabled if the row isn't properly filled.
But when accessing a filed that wasn't filled yet I have an error. So please
tell me how can I check if columns in row are filled or not.
Jarod
 
Hi,

You need explicitly check each required column to see if you have a value
there. Basically it is a loop. You could also catch RowChanging event of the
DataTable and check required values there. Everything depends on design of
your application
 
You need explicitly check each required column to see if you have a value
there. Basically it is a loop. You could also catch RowChanging event of the
DataTable and check required values there. Everything depends on design of
your application

So let's say I have typed dataset and I created a new typed row:

typedrow.myCustomUserColumn <- when I invoke this I get an error because
there is nothing in this column how to check if there is anything ?
Jarod
 
Jarod you should create row AFTER user fills form fields. You have to
validate form fields as well to exclude potential invalid values for given
fields. Then you create row and you set column values to relevant form
control values.

Peter
 
Jarod you should create row AFTER user fills form fields. You have to
validate form fields as well to exclude potential invalid values for given
fields. Then you create row and you set column values to relevant form
control values.

I know, but there is a little problem user interface is divided into a few
pages ( it's ASP.Net application ) so user needs to fill up a few pages and
then row is saved. I keep row in a Session["newRow"] , maybe you have better
ideas ?
Jarod
 
Create some temporary structure which will hold values entered by user. When
user ends his work, you validate data and create the row.

HTH

Peter

Jarod said:
Jarod you should create row AFTER user fills form fields. You have to
validate form fields as well to exclude potential invalid values for
given
fields. Then you create row and you set column values to relevant form
control values.

I know, but there is a little problem user interface is divided into a few
pages ( it's ASP.Net application ) so user needs to fill up a few pages
and
then row is saved. I keep row in a Session["newRow"] , maybe you have
better
ideas ?
Jarod
 
Back
Top