i am using gridview control in my web application,and fill it up using following code.
and aspx code is
it return all list ok,but my requirement is that against each DutyPoint ,there is may be two or three Employees to work on,i want description to display one time if there are more than one employee at that point?
how it is possible?
Code
protected void Page_Load(object sender, EventArgs e)Code
{Code
if (!this.IsPostBack)Code
{Code
this.BindGrid();Code
}Code
Code
}Code
private void BindGrid()Code
{Code
Entities entities = new Entities();Code
GridView1.DataSource = from customer in entities.DutyPoints.ToList() select customer;Code
GridView1.DataBind();Code
}Bash
asp:TemplateField HeaderText="Name" ItemStyle-Width="150"> ItemTemplate> asp:Label ID="lblName" runat="server" Text=''>/asp:Label> /ItemTemplate> EditItemTemplate> asp:TextBox ID="txtName" runat="server" Text=''>/asp:TextBox> /EditItemTemplate> ItemTemplate> asp:Label ID="lblEmp" runat="server" Text=''>/asp:Label> /ItemTemplate> asp:dropdownlist id="Employee">/asp:dropdownlist> /asp:TemplateField>Hide Copy Code
Code
dutyPoint Employee xxx Emplist Emplist Emplist

Vasu GadhiyaRank #7,540 · 239 reputationPosted Sep 3, 2015, 11:07 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Sep 3, 2015, 11:48 PM EDT