Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to build a dynamic matrix

Posted on 2013-11-11
5
Medium Priority
?
271 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

876 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