tags:

views:

42

answers:

1

I have a dropdownlist in gridview and bind grid view from a function in code behind for the dropdownlist. The problem is the dropdownlist is in edittemplate and the selected value is the id in the same celle when the is dropdownlist when the row is not editing.

How I can display in editing the null value????

A: 

Add an item to your dropdownlist that represent the null value.

<asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("CurrencyType") %>' AppendDataBoundItems="true">
            <asp:ListItem  Value="">Not selected</asp:ListItem>
          </asp:DropDownList>
alejandrobog