DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sat, 21 Jul 2007 16:48:41 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    jobs


formview child controls .. added a table and broke control loop??   
Well, I've narrowed the issue down to having added a table inside my
formview. Somehow I must figure out how to navigate the formview
controls around a table, likely another child control or layer to
think about .. it boils down to this:



what does this table..

                       <table style="width: 625px">
                            <tr>
                                <td style="width: 309px; height:
214px" valign="top">
                                    <asp:Label ID="UserNameLabel"
SkinID="Retailer" runat="server" Text="UserName:" /><br />
                                    <asp:TextBox ID="UserName"
SkinID="Retailer" runat="server" Text='<%# Bind("UserName") %>' /><br /

>




do to this ..(that use to work before it)

the function:

      Function FormviewErrors(ByVal whichformview As FormView) As
String
            Dim Errors As String = Nothing


            'Dim zipcode As TextBox =
CType(whichformview.FindControl("ZipCodeTextBox"), TextBox)
            'Dim zip As String = zipcode.Text.ToString
            Dim fcc As Integer =
whichformview.Controls(0).Controls(2).Controls.Count



            Dim fr As FormViewRow =
(CType(whichformview.Controls(0).Controls(1), FormViewRow))
            Dim tc As TableCell = fr.Cells(0)
            For i As Integer = tc.Controls.Count To 1 Step -1
                Dim c As Control = tc.Controls(i - 1)

                Dim x As String = c.ClientID.ToString
                Dim xx As String = c.GetType().ToString

                If c.GetType().ToString =
"System.Web.UI.WebControls.TextBox" Then
                    Dim Tbox As TextBox = CType(c, TextBox)


my formview:

              BackColor="Transparent" GridLines="Both" Width="400px"
DataSourceID="DSForm"
                DataKeyNames="UserId"
OnItemCreated="Form_ItemCreated">
                <EditItemTemplate>
                    <div runat="Server">
                        <br />
                        <table style="width: 625px">
                            <tr>
                                <td style="width: 309px; height:
214px" valign="top">
                                    <asp:Label ID="UserNameLabel"
SkinID="Retailer" runat="server" Text="UserName:" /><br />
                                    <asp:TextBox ID="UserName"
SkinID="Retailer" runat="server" Text='<%# Bind("UserName") %>' /><br /

>

                                    <asp:Label ID="RoleLabel"
SkinID="Retailer" runat="server" Text="Role:" />
                                    <br />
                                    <asp:DropDownList
ID="RoleDropDown" SkinID="Retailer" runat="server"
DataValueField="RoleName"




My function thinks there are only 3 controls under the formview, there
are actually 20. I added a table with two columns and placed all
textboxes into them. I take out the table from my formview and
function (which loops through the formview checking textboxes) works
fine.

My question: how does a table inside a formview impact childcontrols
and how do I loop through the formview now?

Thanks for any help or information.
Date:Sat, 21 Jul 2007 16:48:41 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us