Getting Data and setting/retrieving values to controls

  • Thread starter Thread starter Eagle
  • Start date Start date
E

Eagle

I'm sure this is simple, thanks for helping this newbie. I've worked with
the datagrid and it's very simple to get the dataset, and bind it to the
grid.

Now I have my dataset, and I want to use textboxes instead. How do I do
that?
So I want txtBox1.text = value of the first field in a dataset record.
Then if the user changes that value, need to save that data back to the
dataset then save it back to the database.

Interestingly, everything I see is how to bind to a list or grid, so I
thought this would be simple.

Thanks for your help!
 
ok this can be achieved by using itemtemplate. Use edititemtemplate and give
the textbox in that template and in itemtemplate use label. so that when
first on display you can view label and when the user click on edit button or
any link they willl see the textbox and have a update button to update the
changes. you can find further sample and help in the link below.

http://msdn.microsoft.com/library/d...y/en-us/dnaspp/html/creatingcustomcolumns.asp
hope this helps.
 
Back
Top