Issues with TR and FormView data Bind when TR is Runat=Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Jeffrey

    Issues with TR and FormView data Bind when TR is Runat=Server

    Hello,

    I am using an ObjectDataSourc e with a Custom DataObject etc.

    Everything is working fine, except when I use a Bound control in a Table Row
    that is runat="server"

    As you can see below - i have commented out the code that causes this to
    fail. Eg when i remove <trand replace with the commented out line, the
    binding does not update.

    It works for showing the data, just not updating the CustomObject.

    Please help.


    <%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
    <tr>
    <td>
    <strong>Site : </strong>
    </td>
    <td>
    <asp:DropDownLi st ID="SiteDropDow n" runat="server"
    SelectedValue=' <%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
    DataTextField=" TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
    </td>
    </tr>

  • nick chan

    #2
    Re: Issues with TR and FormView data Bind when TR is Runat=Server

    have u tried placeholder instead? sorry not much experience here

    On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
    wrote:
    Hello,
    >
    I am using an ObjectDataSourc e with a Custom DataObject etc.
    >
    Everything is working fine, except when I use a Bound control in a Table Row
    that is runat="server"
    >
    As you can see below - i have commented out the code that causes this to
    fail. Eg when i remove <trand replace with the commented out line, the
    binding does not update.
    >
    It works for showing the data, just not updating the CustomObject.
    >
    Please help.
    >
    <%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
    <tr>
        <td>
            <strong>Site : </strong>
        </td>
        <td>
            <asp:DropDownLi st ID="SiteDropDow n" runat="server"
    SelectedValue=' <%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
    DataTextField=" TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
        </td>
    </tr>

    Comment

    • Daniel Jeffrey

      #3
      Re: Issues with TR and FormView data Bind when TR is Runat=Server

      not but not sure how that would work

      pls be aware if I make the TD runat=server it works fine, just the TR
      strange hey !

      Dan

      "nick chan" <zzzxtreme@gmai l.comwrote in message
      news:df32ed0d-9459-4d9a-9f48-f78e6ec2f9d4@a1 g2000hsb.google groups.com...
      have u tried placeholder instead? sorry not much experience here
      >
      On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
      wrote:
      >Hello,
      >>
      >I am using an ObjectDataSourc e with a Custom DataObject etc.
      >>
      >Everything is working fine, except when I use a Bound control in a Table
      >Row
      >that is runat="server"
      >>
      >As you can see below - i have commented out the code that causes this to
      >fail. Eg when i remove <trand replace with the commented out line, the
      >binding does not update.
      >>
      >It works for showing the data, just not updating the CustomObject.
      >>
      >Please help.
      >>
      ><%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
      ><tr>
      ><td>
      ><strong>Site : </strong>
      ></td>
      ><td>
      ><asp:DropDownL ist ID="SiteDropDow n" runat="server"
      >SelectedValue= '<%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
      >DataTextField= "TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
      ></td>
      ></tr>
      >

      Comment

      • nick chan

        #4
        Re: Issues with TR and FormView data Bind when TR is Runat=Server

        like this

        <asp:placeholde r id="plc" runat="server">

        <tr>
        .
        .
        .
        .
        .
        </tr>

        </asp:placholder>

        On Jul 17, 7:12 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
        wrote:
        not but not sure how that would work
        >
        pls be aware if I make the TD runat=server it works fine, just the TR
        strange hey !
        >
        Dan
        >
        "nick chan" <zzzxtr...@gmai l.comwrote in message
        >
        news:df32ed0d-9459-4d9a-9f48-f78e6ec2f9d4@a1 g2000hsb.google groups.com...
        >
        have u tried placeholder instead? sorry not much experience here
        >
        On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
        wrote:
        Hello,
        >
        I am using an ObjectDataSourc e with a Custom DataObject etc.
        >
        Everything is working fine, except when I use a Bound control in a Table
        Row
        that is runat="server"
        >
        As you can see below - i have commented out the code that causes this to
        fail. Eg when i remove <trand replace with the commented out line, the
        binding does not update.
        >
        It works for showing the data, just not updating the CustomObject.
        >
        Please help.
        >
        <%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
        <tr>
        <td>
        <strong>Site : </strong>
        </td>
        <td>
        <asp:DropDownLi st ID="SiteDropDow n" runat="server"
        SelectedValue=' <%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
        DataTextField=" TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
        </td>
        </tr>

        Comment

        • nick chan

          #5
          Re: Issues with TR and FormView data Bind when TR is Runat=Server

          or have u tried

          Page.Databind on PageLoad?




          On Jul 17, 4:39 pm, nick chan <zzzxtr...@gmai l.comwrote:
          have u tried placeholder instead? sorry not much experience here
          >
          On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
          wrote:
          >
          Hello,
          >
          I am using an ObjectDataSourc e with a Custom DataObject etc.
          >
          Everything is working fine, except when I use a Bound control in a Table Row
          that is runat="server"
          >
          As you can see below - i have commented out the code that causes this to
          fail. Eg when i remove <trand replace with the commented out line, the
          binding does not update.
          >
          It works for showing the data, just not updating the CustomObject.
          >
          Please help.
          >
          <%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
          <tr>
              <td>
                  <strong>Site : </strong>
              </td>
              <td>
                  <asp:DropDownLi st ID="SiteDropDow n" runat="server"
          SelectedValue=' <%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
          DataTextField=" TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
              </td>
          </tr>

          Comment

          • Daniel Jeffrey

            #6
            Re: Issues with TR and FormView data Bind when TR is Runat=Server

            thanks I will try these
            Dan

            "nick chan" <zzzxtreme@gmai l.comwrote in message
            news:07efa3a7-b7be-4612-a977-0301be7861d0@l2 8g2000prd.googl egroups.com...
            or have u tried
            >
            Page.Databind on PageLoad?
            >
            >
            >
            >
            On Jul 17, 4:39 pm, nick chan <zzzxtr...@gmai l.comwrote:
            >have u tried placeholder instead? sorry not much experience here
            >>
            >On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
            >wrote:
            >>
            Hello,
            >>
            I am using an ObjectDataSourc e with a Custom DataObject etc.
            >>
            Everything is working fine, except when I use a Bound control in a
            Table Row
            that is runat="server"
            >>
            As you can see below - i have commented out the code that causes this
            to
            fail. Eg when i remove <trand replace with the commented out line,
            the
            binding does not update.
            >>
            It works for showing the data, just not updating the CustomObject.
            >>
            Please help.
            >>
            <%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
            <tr>
            <td>
            <strong>Site : </strong>
            </td>
            <td>
            <asp:DropDownLi st ID="SiteDropDow n" runat="server"
            SelectedValue=' <%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
            DataTextField=" TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
            </td>
            </tr>
            >

            Comment

            • Daniel Jeffrey

              #7
              Re: Issues with TR and FormView data Bind when TR is Runat=Server

              placeholder worked great
              strange TR doesnt - think that is a bug

              Dan

              "Daniel Jeffrey" <daniel_c_jeffr ey@hotmail.comw rote in message
              news:OVZKf9I6IH A.1420@TK2MSFTN GP06.phx.gbl...
              thanks I will try these
              Dan
              >
              "nick chan" <zzzxtreme@gmai l.comwrote in message
              news:07efa3a7-b7be-4612-a977-0301be7861d0@l2 8g2000prd.googl egroups.com...
              >or have u tried
              >>
              >Page.Databin d on PageLoad?
              >>
              >>
              >>
              >>
              >On Jul 17, 4:39 pm, nick chan <zzzxtr...@gmai l.comwrote:
              >>have u tried placeholder instead? sorry not much experience here
              >>>
              >>On Jul 17, 3:10 pm, "Daniel Jeffrey" <daniel_c_jeff. ..@hotmail.com>
              >>wrote:
              >>>
              >Hello,
              >>>
              >I am using an ObjectDataSourc e with a Custom DataObject etc.
              >>>
              >Everything is working fine, except when I use a Bound control in a
              >Table Row
              >that is runat="server"
              >>>
              >As you can see below - i have commented out the code that causes this
              >to
              >fail. Eg when i remove <trand replace with the commented out line,
              >the
              >binding does not update.
              >>>
              >It works for showing the data, just not updating the CustomObject.
              >>>
              >Please help.
              >>>
              ><%--<tr style="text-align: left" runat="server" id="SiteTR">--%>
              ><tr>
              ><td>
              ><strong>Site : </strong>
              ></td>
              ><td>
              ><asp:DropDownL ist ID="SiteDropDow n" runat="server"
              >SelectedValue= '<%# Bind("TXSITE") %>' DataSourceID="S iteDataSource"
              >DataTextField= "TXSITE" DataValueField= "TXSITE" ></asp:DropDownLis t>
              ></td>
              ></tr>
              >>

              Comment

              Working...