
Relation between idc=courseID
HTML of Grid view
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
DataSourceID="EntityDataSource1">
<Columns>
<asp:BoundField DataField="course" HeaderText="course" SortExpression="courseID" />
<asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
</Columns>
</asp:GridView>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=dbEn"
DefaultContainerName="dbEn" EntitySetName="userCourses">
</asp:EntityDataSource>
now grid view show only CourseID but i want show name of course.
how can show name of course in grid view instead of courseID?
Hey you have to bind “Course” EntitySetName instead of “userCourses” and
you have to write commandText
More Ref : link
MSDN