Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Jul 26, 2010 @ 18:42
    Ali Sheikh Taheri
    0

    what is the easiest way of populating a drop downlist with the same value as db?

    Hi Sune,

    hope you are well. just a quick quesiton.

    what is the easiest way of populating a drop down list with the same value as database?

    Cheers 

    Ali

  • Sune Bøegh 64 posts 374 karma points
    Jul 26, 2010 @ 18:59
    Sune Bøegh
    0

    Hi Ali,

    Sorry, not quite sure what you mean by this :) 

    The correct item in a dropdown-list should be selected automatically, is this not the case? Or are you asking how one populates a dropdown list with items from another database table?

    Best regards
    Sune

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Jul 26, 2010 @ 19:18
    Ali Sheikh Taheri
    0

    Hi Sune, 

    Thanks for quick reply.

    I simply want to have status as a drop downlist ( because it's only 3 so i didt createa table in database these are the items 1- open 2- closed 3 - in progress) in edit mode.

    how Can I have a drop downlist in edit mode with these items? and if there is any value in database it should pick it up.

    for example I have a record that the status column has the value of "closed". so in edit mode I would like to have a drop down list with 3 elements and and the closed value should be selected. 

    and another question, here is the scenario: I have id of a row as a label in edit mode and becuase it's auto increment column so we cant update it. 

    but I really would like to show the id but in update mode I dont want to update it and I am getting the followin error!!!

    Unable to save:

    Cannot update identity column 'TicketId'.

    Any idea on this?

    Thanks in advance

    Ali

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 02, 2010 @ 18:55
    Ali Sheikh Taheri
    0

    Hi Sune,

    Any luck on this?

    Cheer

    Ali

  • Sune Bøegh 64 posts 374 karma points
    Aug 08, 2010 @ 11:21
    Sune Bøegh
    0

    Hi Ali,

    Very quick message. I'm on vacation at the moment and will be back on the 16th, where I'll get back to you :)

    - Sune

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 10, 2010 @ 10:21
    Ali Sheikh Taheri
    0

    Hi Sune,

    Thanks for letting me know.

    Cheer

    Ali

  • Mirela Budaes 44 posts 94 karma points
    Aug 11, 2010 @ 16:16
    Mirela Budaes
    1

    Hi Ali,

    Regarding the first question (have status as a drop downlist ). I managed to do this by adding a datatype that renders the DropDown list control (let's say it's called ProjectCategories) and given it the prevalues I wanted as values in the DB and then setting the type of the field as the new datatype.

     <field title="Category" sourceField="Category" umbracoDataType="ProjectCategories"></field>

    Let me know if it works for you.

    Good luck,

    Mirela.

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 11, 2010 @ 16:22
    Ali Sheikh Taheri
    0

    Hi Mirela,

    That's a brilliant idea. simple and easy and I am sure that's going to work.

    Thanks a lot for your great solution.

    Cheers

    Ali

  • Sune Bøegh 64 posts 374 karma points
    Sep 01, 2010 @ 23:32
    Sune Bøegh
    1

    Glad you guys figured this out and it's an elegant solution, I think.

    Ali, about your other question - it's possible to mark a field as readonly by setting the attribute readonly="true" on the field. For some reason I missed this in the documentation on codeplex, but I'll update it as soon as possible. Anyway, hope this solves the issue.

    Btw. sorry about the late reply! I've been very busy since getting back from vacation.

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Sep 02, 2010 @ 13:09
    Ali Sheikh Taheri
    0

    Sune, 

    Hope you had a great vacation. thanks for your reply. I will have a look when I get chance and will let you know the result. 

    You are legend.

    Cheers

    Ali

Please Sign in or register to post replies

Write your reply to:

Draft