By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

Getting contents of a PlaceHolder

P: n/a
I am attempting to add a drill down datagrid to my webpage so the user
will not have to leave the page to get further information on a row.

There are 12 other columns before this column.
<ItemStyle Width="1" />
<asp:PlaceHolder ID="ExpandedContent" Visible="false" Runat="server">
<new datagrid goes here>

</td> </tr> </asp:PlaceHolder> </ItemTemplate> </asp:TemplateColumn>

Here's what I'm trying to do in the C# code. This should trigger when
the user clicks the +/- sign at the beginning of the row.
protected void Grid_ItemCommand( Object sender, CommandEventArgs e )
if ( e.CommandName == "Expand" )
ExpandedContent =
(PlaceHolder)this.ConfGrid.Columns[this.ConfGrid.Columns.Count - 1].
// PlaceHolder ExpandedContent =
(PlaceHolder)confGrid.Item.Cells[confGrid.Columns.Count -
ExpandedContent.Visible = !(ExpandedContent.Visible);
// ImageButton btnExpand =
if (btnExpand.ImageUrl == "~/Images/Plus.gif")
btnExpand.ImageUrl = "~/Images/Minus.gif";
btnExpand.ImageUrl = "~/Images/Plus.gif";

I can't get the ExpandedContent to have a value. How to I get the
contents of the PlaceHolder into my variable.


May 4 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Nevermind...I figured it out. I wasn't properly using the event
handler. All is good now.

May 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.