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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put multiple columns in one column in DataGrid

Status
Not open for further replies.

MikeMCSD

MIS
Jul 12, 2002
107
0
0
US
I trying to put a ButtonColumn within another column
(just below it). Is this possble?
This didnt' work:

<asp:TemplateColumn>
<ItemTemplate>

<asp:HyperLink id=Hyp2 runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' NavigateUrl='<%# "... .%>'></asp:HyperLink>

<asp:ButtonColumn Text="Remove" ButtonType=LinkButton CommandName="Delete"></asp:ButtonColumn>

</ItemTemplate>
</asp:TemplateColumn>

Says "active schema doesn't support it". I'm using
ie5 schema.
Any ideas?
Thanks
 
No, you can't do that.

And in the future, if you get the squiggles on the markup, then you can always just try and run the page to see if it's a "real" error or a VS complaint.

This one will throw a real exception if you try to run it.

Really, though, if you just want a delete button in there, you can just put one in there... no need to use the ButtonColumn.

<asp:Button id=btnDelete runat=Server CommandName="Delete">Delete</asp:Button>

Pressing this button will fire the DataGrid's Delete Event, just like the button that would have appeared in the ButtonColumn would have.

-p

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top