locked
Use Navigation Property inside GridView RRS feed

  • Question

  • Hello folks,

    I have a GridView associated with a EntityDataSource control.

    Now, when the user wants to edit some record, I want him to be able to change the product category.

    The problem is that the Category is CategoryID and not the category name.

    I know how to use navigation property in ItemTemplate with Label and show the current category name:

     <ItemTemplate>
    
    	<asp:Label ID="lblCategory" runat="server" Text='<%# Eval("Category.Name") %>'></asp:Label>
    
    </ItemTemplate>
    

    But I don't know how to use this navigation property(Category.Name) with a Drop Down List Control in order to let the user select a different category if he wish.

    Can you help me please?

    Yair

    Wednesday, June 15, 2011 10:21 PM

Answers

All replies