1

I created a form for a new item in a list and I use asp:dropdownlist:

<asp:DropDownList runat="server" id="DropDownList1">
<asp:ListItem>choice 1</asp:ListItem>
<asp:ListItem>choice 2</asp:ListItem>
</asp:DropDownList>

I need to save one of the choices in a column.

How do I bind this dropdownlist with a specific column for saving the selected value?

Phil Greer
  • 2,287
  • 9
  • 21
  • 23
Ludvik Ctrnacty
  • 191
  • 2
  • 9
  • Are you creating a Visual Web Part? Why aren't you using default list forms? – Arsalan Adam Khatri Jun 22 '14 at 11:00
  • Because I have several users and I need that these users see different options by their rights. Update: I used sharepoint dropdown list with choices, that are taken from other list. That's OK for me. But the problem is by edit form. I have column, in which is stored some value, let's say value 3, in this dropdown I have two choices - value 1 and value 2. But by edit form user can see in dropdown also this value 3 and that's problem for me, is there any way how to hide this value? – Ludvik Ctrnacty Jun 22 '14 at 11:17
  • 2
    Is JavaScript an option? You can either use JSOM or SPServices (requires jQuery) to provide some client-side validation. – wjervis Jun 22 '14 at 15:55
  • I'm not sure. What do I need for JS? I have only some rights on the SP server because of company politics. I'm owner of my created lists, wokflow, etc. but I cannot change server settings. – Ludvik Ctrnacty Jun 22 '14 at 16:25
  • Ok, I tried it and JS works. I found JS solutions in other questions and used it in my solution. – Ludvik Ctrnacty Jun 22 '14 at 18:48

0 Answers0