I have a listview(not a gridview) and i want to put same results in one cell.
I can't make it with rowspan like in gridview, because listview didn't have this method.
What i have now :
FullName | LgotName |
------------------------
John |First |
John |Second |
John |Third |
What i want to have
FullName | LgotName |
------------------------
John |First |
|----------|
|Second |
|----------|
|Third |
------------------------ (this is end of John row)
My code:
<asp:ListView ID="ListView1" runat="server"... >
<LayoutTemplate>
<div class="outerContainer">
<table id="docnewTable">
<thead>
<tr>
<th>Full Name</th>
<th>LgotName</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody runat="server" id="itemPlaceholder"></tbody>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td><%# Item.fam_v %></td>
<td><%# Item.im_v %></td>
<td>
<asp:Button ID="ChangeDocBtn" runat="server" />
</td>
<td>
<asp:Button ID="DeleteDocBtn" runat="server" Text="Delete />
</td>
</tr>
</ItemTemplate>
</asp:ListView>
I think about loop - select one value, and skip 1 , but it not very effective.
I use Asp.net, EF, linq
My Select method in c# :
I
Enumerable<FinalDoc> fidn = from post in repository.doctors
join meta in repository.DoctorsLG on post.pcod equals meta.pcod
join thir in repository.SP_lgota on meta.idGK equals thir.C_LGT
where post.actual == 1 select new FinalDoc
{
mcod = post.mcod,
pcod = post.pcod,
c_ogrn = post.c_ogrn,
fam_v = post.fam_v,
im_v = post.im_v,
ot_v = post.ot_v,
idGK = meta.idGK,
LgotName = thir.LgotName
}
PLEASE READ IT CLEARLY .
How can i combine my results to make rowspan ?
If i just write rowspan i will add SAMPLE RESULTS , and i need to add it like : value with index[0], value with index[1], value with index[2].