Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Guidance on Collapsible Panel Extender

$
0
0

I have a page that display Items I sell in a listview, The items in the listview are separated by category, and in a collapsible panel.

When the page loads the Listview Displays ALL Item categories, but the panles are collapsed so i don't get a long page of info

I would like on my button click event to expand the panel since it now only displays one cetagory, I need to do this in C#

protected void ServiceID_Click(object sender, EventArgs e)
    {
        Button SelectedServiceID = (Button)sender;
        _SelectedServiceID = SelectedServiceID.CommandArgument.ToString();
        SqlManageItems_DisplayItems.SelectCommand = "SELECT DISTINCT(CI.ServiceID), CDSD.ServiceName FROM CoItems AS CI INNER JOIN CoDivisionServiceData AS CDSD ON CI.ServiceID = CDSD.ServiceID WHERE CI.ServiceID = '" + _SelectedServiceID + "'";
    }

I need to add ListView1.FindControl "CollapsedPanel" .Expand or whetever is required. This is what I havce but it says object reference not set

CollapsiblePanelExtender _XPand = ListViewItems.FindControl("DisplayItemDetailsCollapse") as CollapsiblePanelExtender;
        _XPand.Collapsed = false;




Viewing all articles
Browse latest Browse all 5678

Trending Articles