troubleshooting Question

SharePoint 2003 Connected Web Parts Filter and Button Column Issue

Avatar of murphyge
murphyge asked on
.NET ProgrammingC#Microsoft SharePoint
1 Comment1 Solution453 ViewsLast Modified:
Premise: My web part page contains 2 web parts, connected via IRowProvider and IRowConsumer. The ButtonColumn on the Main Web Part provides the the row the Child Web Part. With a simple datagrid and ButtonColumn, this work perfectly.

However, to complicate things, I need to filter the DataGrid based on 4 DropDownLists. So by person, year, etc. The filtering works perfectly also. However, when trying to filter and then click the ButtonColumn, the SelectedIndex on the DataGrid remains at -1.

It looks like there is interference between the postback on the ButtonColumn and the DropDownList autopostback.

Where should I Bind the initial data and where should I then filter this data?

I have trimmed down the code for clarity.
protected override void CreateChildControls()
            if (_serverName != "" && _databaseName != "")
                ddlPillarFilter.ID = "ddlPillarFilter";
                ddlPillarFilter.AutoPostBack = true;
                //Binds DropDownList 
                ddlPillarFilter.Load += new EventHandler(ddlPillarFilter_Load);
                //Rebinds DataGrid Based on new Filter values               
                ddlPillarFilter.SelectedIndexChanged += new EventHandler(ddlPillarFilter_SelectedIndexChanged);
                dgData = new DataGrid();
                //Other Columns added here
                ButtonColumn selectionColumn = new ButtonColumn();
                selectionColumn.DataTextField = "projectid";
                selectionColumn.DataTextFormatString = "{0}";
                selectionColumn.ButtonType = ButtonColumnType.LinkButton;
                selectionColumn.HeaderText = "ID";
                selectionColumn.CommandName = "Select";
                //Binds Datagrid
RenderWebPart(HtmlTextWriter output)
         //Render Controls
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros