Last post Feb 13, 2010 05:50 AM by nick5454
Dec 05, 2006 03:23 PM|JimAmigo|LINK
In my application I have two edit pages one for staff member and one for manager. I have some questions about the best way to proceed in building the editable web form for each.
The staff member page will have 26 editable fields, some dropdownlist, some text boxes and the manger webform will have 101 editable fields, some dropdownlist, some text boxes.
1. Since there are some many fields would it be best to use a formview or details view?
2. What's the best way to make sure you use the majority of the visible page? Changing width etc?
3. The manager webform will need to be built dynamically. Any suggestions or advice in looking at the best way to do this?
Dec 06, 2006 08:23 AM|rexlin|LINK
The main difference between DetailsView and FormView is that DetailsView has a built-in tabular rendering, whereas FormView requires a user-defined template for its rendering. The FormView and DetailsView object model are very similar otherwise.
However, formview will provide more customizations in your application.
Dec 06, 2006 08:55 AM|Zippeh|LINK
1. Due to the large number of fields in your form, your best bet would be to use a FormView and lay them out in an organised manner. A DetailsView will generate them for you in a straight top to bottom list with no possibility of moving them around to make
them more user friendly.
2. Using the FormView you can position the elements where ever you want them on the page.
3. If, by dynamically you mean by depending on what the DropDownList(s) are selected to, then you can use the OnSelectedIndexChanged event handler and set the different TextBox, RadioButton etc controls' .Visible property to False to hide them.
Dec 06, 2006 05:35 PM|JimAmigo|LINK
Feb 13, 2010 05:50 AM|nick5454|LINK
This may be old but for people wandering, I would like to clarify this.
The statement "DetailsView offers no way to customize" is a false statement.
I suppress the header and change the flow and positon of elements in it. The FormView is simply easier to do it straight out of the box. I use the DetailsView a lot.