Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. Updating GridView / FormView and the quirkiness of item templates

Updating GridView / FormView and the quirkiness of item templates

Scheduled Pinned Locked Moved Clever Code
helpquestionwpfcomannouncement
5 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Christopher Duncan
    wrote on last edited by
    #1

    It all started so innocently, trying to use a form view. No matter what I did, the UPDATE would fail, generating a page dump and complaining that I needed to declare the scalar variables @whatever. My UpdateCommand was set to the standard "FieldName=@FieldName" and this worked everywhere else, so what gives? I made the foolish mistake of believing that I had free reign to format as I pleased within the ItemTemplate and EditItemTemplate sections. So, wanting to make a nice, lined up looking form, I included a table in each. And that was the problem. Add the table, get the bizarre error. Take it out and just put a <br/> between each control, and the update works. Bogus.

    Christopher Duncan Author of The Career Programmer and Unite the Tribes Coming soon: Got a career question? Ask the Attack Chihuahua! www.PracticalUSA.com

    P P 2 Replies Last reply
    0
    • C Christopher Duncan

      It all started so innocently, trying to use a form view. No matter what I did, the UPDATE would fail, generating a page dump and complaining that I needed to declare the scalar variables @whatever. My UpdateCommand was set to the standard "FieldName=@FieldName" and this worked everywhere else, so what gives? I made the foolish mistake of believing that I had free reign to format as I pleased within the ItemTemplate and EditItemTemplate sections. So, wanting to make a nice, lined up looking form, I included a table in each. And that was the problem. Add the table, get the bizarre error. Take it out and just put a <br/> between each control, and the update works. Bogus.

      Christopher Duncan Author of The Career Programmer and Unite the Tribes Coming soon: Got a career question? Ask the Attack Chihuahua! www.PracticalUSA.com

      P Offline
      P Offline
      peterchen
      wrote on last edited by
      #2

      Christopher Duncan wrote:

      <br/>

      I take it you are not talking about MFC :rolleyes:

      We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
      blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

      C 2 Replies Last reply
      0
      • P peterchen

        Christopher Duncan wrote:

        <br/>

        I take it you are not talking about MFC :rolleyes:

        We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
        blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

        C Offline
        C Offline
        Christopher Duncan
        wrote on last edited by
        #3

        Well, when I discovered what was going on, at least two of those initials could well represent my instinctive outburst. I'd elaborate, but my kid sister just walked in... :)

        Christopher Duncan Author of The Career Programmer and Unite the Tribes Coming soon: Got a career question? Ask the Attack Chihuahua! www.PracticalUSA.com

        1 Reply Last reply
        0
        • P peterchen

          Christopher Duncan wrote:

          <br/>

          I take it you are not talking about MFC :rolleyes:

          We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
          blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

          C Offline
          C Offline
          Christopher Duncan
          wrote on last edited by
          #4

          As it turns out, you can use standard html tables just fine, as long as it's not aspx stuff. I used the table / tr / td tags and got what I wanted. Serves me right for defaulting to the Microsoft way of doing things... :rolleyes:

          Christopher Duncan Author of The Career Programmer and Unite the Tribes Coming soon: Got a career question? Ask the Attack Chihuahua! www.PracticalUSA.com

          1 Reply Last reply
          0
          • C Christopher Duncan

            It all started so innocently, trying to use a form view. No matter what I did, the UPDATE would fail, generating a page dump and complaining that I needed to declare the scalar variables @whatever. My UpdateCommand was set to the standard "FieldName=@FieldName" and this worked everywhere else, so what gives? I made the foolish mistake of believing that I had free reign to format as I pleased within the ItemTemplate and EditItemTemplate sections. So, wanting to make a nice, lined up looking form, I included a table in each. And that was the problem. Add the table, get the bizarre error. Take it out and just put a <br/> between each control, and the update works. Bogus.

            Christopher Duncan Author of The Career Programmer and Unite the Tribes Coming soon: Got a career question? Ask the Attack Chihuahua! www.PracticalUSA.com

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            OK - I don't know why this was 1 voted. I'll 5 it to raise it up - oops perhaps GridViewGuy did the driveby.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups