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
 
Bart,
Why not use a datagrid control? It has the functionallity you are
requesting.
 
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
 
Jared,

could you take a look at my other question "DataGrid and dataReader"
Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top