M
MattB
I have a RadioButtonList then binds to a DataTable in my Web Form. The
DataTextField is called "descrip" and I want to bind only records that don;t
have an empty descrip field.
My initial approach was to loop through the rows collection, test each row's
descrip field and if it's empty delete it. That didn;t work because I guess
you can't delete from a collection you are currently looping on (makes
sense).
I've got some other ideas, but before I get too far, is there an established
"best way" to do this? I'm working on looping through my table and just
creating an array list of each row with a blank descrip, and then looping
through that array list and deleting rows listed there. This kind of works,
but seems to end up a row off. I wish I could just "delete from mytable
where trim(descrip) = ''". Is there a better way to do this? Thanks!
Matt
DataTextField is called "descrip" and I want to bind only records that don;t
have an empty descrip field.
My initial approach was to loop through the rows collection, test each row's
descrip field and if it's empty delete it. That didn;t work because I guess
you can't delete from a collection you are currently looping on (makes
sense).
I've got some other ideas, but before I get too far, is there an established
"best way" to do this? I'm working on looping through my table and just
creating an array list of each row with a blank descrip, and then looping
through that array list and deleting rows listed there. This kind of works,
but seems to end up a row off. I wish I could just "delete from mytable
where trim(descrip) = ''". Is there a better way to do this? Thanks!
Matt