I am working in mvc project where I want to generate one gridview(html table). The headers should bind from db and data also should bind from db dynamically. This is my metadata or master table.
Id Name Label Value Emp_id
31 Adhar DocumentNumber 12345678 1
32 Adhar ExpiryDate 1/1/2015 1
33 Pan DocumentNumber 123456789 2
34 Pan ExpiryDate 1/1/2015 2
36 Pan IssueLoc India 2
and my table should be like this below. if the input parameter emp_id is 1 then table should look like below. This is HTML
<Table><tr><th>DocumentNumber</th><th>ExpiryDate</th><td>12345678 </td>1/1/2015<td></td></tr></table>
OR this is plain web sheet.
DocumentNumber ExpiryDate
12345678 1/1/2015
I am working in mvc4 entity framework. How to overcome from this? Can anybody give me some idea to solve it. I have googed across and found nothing. Please provide me some idea. If question is uncleared please let me know
This is for emp_id with 2
DocumentNumber ExpiryDate IssueLoc
12345678 1/1/2015 India
With respect to above data I need output in the form of
Name DocumentNumber ExpiryDate
Adhar 12345678 1/1/2015
Name DocumentNumber ExpiryDate IssuedLoc
Pan 123456789 1/1/2015 India
Yes, The answer you provided is almost correct as per my requirement. I tried myself to make table as I need but I could not get it. Sorry for troubling you