|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Binding TextBoxSQL 2000 database. The database has one table with the following columns: CaseloadKey, EmployeeFTCount, EmployeePTCount I've already created a FormView that connects to the datasource and allows for updating, deleting, inserting. However, I've noticed that the textbox controls within the formview are not in the position that I want and can't find a way to easily re-position them. Therefore, I created an HTML table and placed textbox controls in the table, with the expectation to peform the same binding to the individual textboxes as that done in the formview. However, I cannot find good documentation as to Bind to the datasource using the textbox control. The asp code for the form view uses the <%# Bind...> tag, but this doesn't seem to work on the textbox. Therefore... 1. Is there an easy method to reposition/format the formview to match the table's format? 2. Or, how to do I bind to the textbox control with the same functionality as that of the formview? If you have links to resources, that would help too. Thanks, Michael Try putting the your table with the textboxes back into the FormView to
get 2 way databinding with your textboxes. Else you can use CSS absolute positioning to position the textboxes within the FormView without the aid of the table. Hope that helps. Try putting the your table with the textboxes back into the FormView to
get 2 way databinding with your textboxes. Else you can use CSS absolute positioning to position the textboxes within the FormView without the aid of the table. Hope that helps. Thanks. But how do I get the [HTML] table into form view?
<CaffieneR***@gmail.com> wrote in message Show quoteHide quote news:1142547429.750813.130810@j33g2000cwa.googlegroups.com... > Try putting the your table with the textboxes back into the FormView to > get 2 way databinding with your textboxes. > > Else you can use CSS absolute positioning to position the textboxes > within the FormView without the aid of the table. > > Hope that helps. > Assuming you have VS 2005.
The first way is to first go into design view and "Choose Data Source" action within the FormView to set your datasource. This would also populate all the different templates in FormView with the various controls. Switch to HTML view and structure the controls within each of the 3 templates with the html table - yes, hand edit the html code with the table, tr, td, etc tags. The other way is to "Edit Templates" and drag & drop a table into each of ItemTemplate, EditItemTemplate and InsertTemplate. Then drag & drop the various controls into the table. Finally set all the properties within each control correctly. I think the first way has less room for error because the control's properties are set by VS 2005. I do believe the MSDN article you found describes the process in a more
detailed and less painful manner than mine. Found a very good reference for what you are describing.
http://msdn2.microsoft.com/en-us/library/3fs4k4w4.aspx I believe this should do the trick!! Thanks again! Michael <CaffieneR***@gmail.com> wrote in message Show quoteHide quote news:1142547429.750813.130810@j33g2000cwa.googlegroups.com... > Try putting the your table with the textboxes back into the FormView to > get 2 way databinding with your textboxes. > > Else you can use CSS absolute positioning to position the textboxes > within the FormView without the aid of the table. > > Hope that helps. >
GridView w/ ObjectDataSource w/ Business object layer
GridView, ObjectDataSOurce, and enum parameter for select Web UserControl (ascx) and UrlProperty attribute Gridview custom sort - works but always sorts ascending Perform insert to gridview/table DropDownlist problem Creating Dynamic controls Datalist formatting questions Adding client side code to RadioButtonList control item??? Detecting if client-side validation javascript is registered? |
|||||||||||||||||||||||