Solved

How to build a dynamic matrix

Posted on 2013-11-11
5
251 Views
Last Modified: 2013-12-22
Hello experts,

I have been tasked with recreating some paper forms to make them electronic.

One form is essentially a dynamic matrix. The current form is an excel spreadsheet. Depending on the data retrieved, the number of rows and columns is dynamic.

I can retrieve the number of rows and columns by querying the db.

I have tried to recreate the form by using <asp:Table />. I can make the form look pretty good (see attached) but I run into all kinds of trouble with losing dynamic controls on postback and assigning unique ids.  I have been at this for two days but other than a pretty form... not much success.

Maybe I am tired and I am taking a completely wrong approach.  Please advise.

Vince
matrix.jpg
0
Comment
Question by:vstack
  • 3
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39641508
If you are creating dynamic content, you need to recreate them on post-back, at the correct place in the page life-cycle, so that view state and other such things can get processed.
0
 

Author Comment

by:vstack
ID: 39641666
Yes... the dynamic content must be recreated if I use the <asp:Table /> since I need dropdowns that the user selects from. This needs to be persisted back to the db.

This is a lot of work, recreating everything in page load or init and though I have had some success, it just doesn't feel right and it's buggy.

Perhaps, I will take a step back to allow the user, by selecting, dropdowns in another format, then persist this to the db then just create a read only form for the 'spreadsheet' look.

I was hoping to accomplish the editable 'matrix' using gridview or nested repeaters but so far it is proving to be a frustration.

Thanks

Vince
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39642231
If you need a "spreadsheet" control, would you have the capability for a component, like Component One, Infragistics, or would you need something free?
0
 

Accepted Solution

by:
vstack earned 0 total points
ID: 39678770
I don't need a spreadsheet control. I have solved the issue by filling the matrix from other pages and presenting a 'read only' matrix.
0
 

Author Closing Comment

by:vstack
ID: 39734483
Though I appreciate the responses, none of the responses applied to my situation.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question