Results 1 to 5 of 5

Thread: Custom Drop Down List

  1. #1

    Thread Starter
    Addicted Member PeteD's Avatar
    Join Date
    Jun 2003
    Location
    Sydney
    Posts
    158

    Custom Drop Down List

    Hi all,

    Background:
    I have a web page which has a datagrid in it. a couple of the columns in this datagrid have a dropdown list. The number of rows present in the grid is dynamic, and changes at runtime quite frequently, but is usually from 5 to 30 or so rows.
    Due to client requirements, the rows need to be editable at all times, ie my client is un-willing to accept that the user has to click a button next to a row to bring it to "edit mode" then modify that line, save it, and repeat the process for each row.
    One of the dropdown lists has around a hundred and fifty rows in it. an other has around 30 rows. The contents of the drop down lists will not be needing to change during the lifecycle of the form.
    I'd like to reduce the html bulk created by repeating the drop-down list multiple times, as each and every dropdown list on the page will present exactly the same options to the client, I'd like the page to download the data once, then render each drop down list at run-time on the client. I was wondering if anyone else had already done this?
    Thanks in advance for your help.

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    On page load get all the data to go into the dropdownlists into a global dataset. Set all the dropdownlists to use this dataset as a datasource.

    HTH

    DJ

  3. #3

    Thread Starter
    Addicted Member PeteD's Avatar
    Join Date
    Jun 2003
    Location
    Sydney
    Posts
    158
    Thanks for your response, although I already do this, but what I want to do is reduce the amount of HTML sent to down to the client. I normally have 30-50 rows in my datagrid, each row with 3 comboboxes. Each combo box has between 50 and 300 items in it. My page size can be up to 1.3 mb because of this!! Making only one row editable at a time is not an option due to the spec.

  4. #4
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    Well first, if you turn off ViewState your page will be smaller, but the drawback would be on posts back, it will be slower.

    It sounds to me like since your page isn't going to change, then you should look at implementing some of the caching features ASP.NET offers:

    http://authors.aspalliance.com/aspxt...gfeatures.aspx
    ~Ryan





    Have I helped you? Please Rate my posts.

  5. #5

    Thread Starter
    Addicted Member PeteD's Avatar
    Join Date
    Jun 2003
    Location
    Sydney
    Posts
    158
    We already have a method of storing viewstate in SQL server as opposed to sending it down to the client. This improved speed a little bit. Unfortunately, the page changes all the time, so caching is not a solution.

    What I'm thinking of is sending the combox lists down to the client in one javascript array for each combo, and then populating them in each row of the datagrid at the client. I think I'll get some view state errors with this though, as the listitems will have changed when the page submits.

    Another thing I'm wondering is whether I could mimic the look of a drop down list with a label and an image, and when the user clicks on it, a fake dropdown list portion (in a div tag) would appear in exactly the right place. Not sure if these Ideas would be feasable?

    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width