Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Button to Datagrid

Status
Not open for further replies.

suicidaltendencies

Programmer
Jan 28, 2004
58
US
I'm trying to add a button to the footer of my datagrid. It looks like the only way I can add a button is to put it in a columns footertemplate area. This associates it to a column. I don't want it to be part of a column because I'd like it on the right side and the column on the right of my datagrid is very thin (the size of my button widens the column). Is there a easy solution?

Thanks,
Harold

</edititemtemplate>
<footertemplate>
<asp:button id="Add" runat="server" text="Add Service" height=".7cm" />
</footertemplate>
</asp:templatecolumn>
 
I want to add a single button on the bottom right of the datagrid, not a button for every record.

Thanks,
Harold

 
You can do that. You just don't add anything in the rightmost column. I currently do that for adding a new record by putting the required fields in the correct columns in the footer and the add button in an extra rightmost column which doesn't contain any data for the rest of the rows.

James :)

James Culshaw
james@miniaturereview.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top