Solved

How to build a dynamic matrix

Posted on 2013-11-11
5
243 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now