[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Best way to handle dynamic datagrid columns from a pivot table.

Asked by acadalzo in Programming for ASP.NET

Tags: datagrid, dynamic, pivot, columns

I want to display the results of a pivot table in a datagrid.  I have defined the static columns in the <Columns> section as bound columns.  Since I don't know what the pivoted columns are going to be (they are data dependent) I have to dynamically add them in the code before doing the data binding.  That works ok, but on postback is where it gets ugly.  What I have to do in the Page_Init is recreate the dynamic columns because they won't be preserved in the postback.  Unless they are  recreated in the Page_Init event, the sort event will not fire when the header of one of the "pivot" (i.e. dynamic) columns is clicked.  This means I have to save those column names in a Session variable, so I know what I need to recreate on the postback.  That handles the problem with sorting on a pivot column.  If instead of doing a sort, the user changes any of the criteria, I get the new set of data and I transform it into a new pivot table.  Now I have to delete all of the pivot columns in the datagrid from the previous request.    It seems that there are a whole lot of issues to deal with for dynamically-created columns.  Is there an easier way?  Am I missing something here?  Thanks.
[+][-]06/22/05 12:39 AM, ID: 14273131Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Programming for ASP.NET
Tags: datagrid, dynamic, pivot, columns
Sign Up Now!
Solution Provided By: shivam2k
Participating Experts: 3
Solution Grade: A
 
[+][-]06/06/05 07:50 AM, ID: 14153685Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/06/05 07:58 AM, ID: 14153763Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/06/05 09:30 AM, ID: 14154770Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/05 01:51 PM, ID: 14174584Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/01/05 08:41 AM, ID: 14348815Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/01/05 08:18 PM, ID: 14352575Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92