Thread: How to ??

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    12
    Rep Power
    0

    How to ??


    Hi all,
    Just need some general input on how I should do the following:

    Want to display a grid (table with let's say 40 colums, 50 rows) to the user.
    Depending on existing data in the db some of the cells should have one different background color (white for free, red for occupied).
    Once grid is colored from db data and displayed to user, he can change then the grid (set/clear cells, this is done with JavaScript).
    When done and user hits 'submit' the now changed free/occupied info should go back into the db.

    I thought about using the asp.net htmtable control to build grid and changing background color of cells according to data in db. (Possible?)
    But how do I get back the modified table into my db ? (filling a hidden textbox with all colored cells when user hits 'submit' ??)

    Any ideas are highly appreciated.
    TIA
    acki4711
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0
    Hi acki,

    In your table you could set the table cell id to be the key of the database record. I would also make 2 variables in each table cell like [modified] and [status] which you can set to free or occupied when you load the db into the table. In your javascript that changes the colour of the cell, also set the [status] variable and the modified to true. Then when you loop through the table check if any [modified] values are true and if it is send the new [status] to the db.

    hth,
    Richard

    Originally Posted by acki4711
    Hi all,
    Just need some general input on how I should do the following:

    Want to display a grid (table with let's say 40 colums, 50 rows) to the user.
    Depending on existing data in the db some of the cells should have one different background color (white for free, red for occupied).
    Once grid is colored from db data and displayed to user, he can change then the grid (set/clear cells, this is done with JavaScript).
    When done and user hits 'submit' the now changed free/occupied info should go back into the db.

    I thought about using the asp.net htmtable control to build grid and changing background color of cells according to data in db. (Possible?)
    But how do I get back the modified table into my db ? (filling a hidden textbox with all colored cells when user hits 'submit' ??)

    Any ideas are highly appreciated.
    TIA
    acki4711

IMN logo majestic logo threadwatch logo seochat tools logo