Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
Webgrid Dropdown Values
posted

I have a grid with one column that shows users that completed a task.  I have made this column a drop-down that is bound to the names (display) and ids (value) of active users.  My problem is that if a user that previously completed a task later goes inactive, then only the user's id shows in the grid column instead of the name.  Is it possible to have a grid column display a label and only show the drop-down for editing.  I tried this and ended up with errors on the update, so before I continue with this I thought I would ask for the best approach.  TIA for any assistance.

 

Parents
No Data
Reply
  • 45049
    posted

    I can think of two approaches to get a similar result to what you've described.

    One approach is to bind your WebCombo to your entire list, active or not.  You should then be able to hide the rows in the WebCombo that represent inactive entries.  Assuming you've set your WebCombo's selection type to DropDownList, the end-user will be unable to select any inactive entries, yet would still see these entries properly translated in the grid for existing rows.

    Another approach is to use a row edit template for all your editing.  You can then place the "text" portion of each entry in the cells of your grid, and can bind a WebCombo or drop-down-list inside the template to list only your active entries for editing.

Children
No Data