Adding controls

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

I have another question.

On my asp-page I put a label.
I manually create a table and set that table in the text of the label.
This way my table is displayed.

My question is how can i add 2 columns that contain buttons to that table.
The last two columns of my table need to contain buttons to edit or delete a
given record.
How can I do that ?

Thanks
 
If i'm not mistaking if i want to edit a record, it would happen in the row
where you pushed the edit-button.

My boss wants to display the data for that row at the top of the page in
textboxes.

Can that be done with the datagrid as well ?
 
Bart,
You don't have to use the datagrids edit mode, when you click the "edit"
button you can get the correct record by using the datagrids' ItemCommand
event to get the CommandName and the current dataitem, then you can populate
the text boxes for editing with those values.
Jared
 
Thx for the advice.
I'll have to check with my boss.

Just out of curiosity.
Is there no way to do it like I had planned, so by creating a table and
adding two extra columns with buttons?
 
Bart,
You can do it any way that you want, it just seems that it will be
harder in the long run if you have to create your own logic to determine
which row is selected and get your data based on the selection. That's the
only reason I suggested the datagrid. The majority of the functionallity is
already there, it should speed development up and produce a more responsive
application
Jared
 
Back
Top