Thanks to all. That got it. Knew there was a better way than the stupid way I had found.
Alan
You should not have to use int.parse.
What is the type of dsx.Tables[0].Rows[0]["udfc1txtbxloc"]?
Do you get an error (what error) if you try this:
txtbudfc1.Location = new System.Drawing.Point( (int)dsx.Tables[0].Rows[0]["udfc1txtbxloc"],(int)dsx.Tables[0].Rows[0]["udfc1txtbyloc"]);
Einar
>I have a SQL table that I gather a dataset from. Included in the dataset are values from INT fields. 2 of the fields I use to reposition a textbox on the form. The only way I can make this happen is as follows:
>
>txtbudfc1.Location = new System.Drawing.Point( int.Parse(dsx.Tables[0].Rows[0]["udfc1txtbxloc"].ToString()),
> int.Parse(dsx.Tables[0].Rows[0]["udfc1txtbyloc"].ToString()));
>
>I assume there is a better way than "int.parse(table.row.fieldname.tostring())" conversion. Is there a simple way to get the INT value from the dataset object?
>
>Any ideas?
>
>thanks
>
>Alan Wyne
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only