bring the columns dynamically according to search
bring the columns dynamically according to search
Colleagues, I use this code and can not bring the columns only when I leave the pre-defined, but if I wanted to use the same gridview, and searching of different tables with different number of columns, and dynamically populate, as the gridview does not natively integration with the jquery plugin datables.
[code]
<%# Eval("id") %>
<%# Eval("engine")%>
<%# Eval("browser")%>
<%# Eval("platform")%>
<%# Eval("version")%>
<%# Eval("grade")%>
<%--
--%>
<%# Eval("marketshare")%>
<%# Eval("RDate")%>
<%--
Total:
S.No
Rendering Engine
Browser
PlotForm
Engine Version
CSS Grade
Market Share
Release Date
--%>
[/code]
========================
How to do this with datables dynamically?
[code]
<%# Eval("id") %>
<%# Eval("engine")%>
<%# Eval("browser")%>
<%# Eval("platform")%>
<%# Eval("version")%>
<%# Eval("grade")%>
<%--
--%>
<%# Eval("marketshare")%>
<%# Eval("RDate")%>
<%--
Total:
S.No
Rendering Engine
Browser
PlotForm
Engine Version
CSS Grade
Market Share
Release Date
--%>
[/code]
========================
How to do this with datables dynamically?
This discussion has been closed.
Replies
name, tel, age, adress
in the table car have the colums:
carname, model
So, in one talbe exist 4 colums and another have 2 two, one different from another.
If i use just the gridview, and a
....
this.GridView1.DataSource = ds;
this.DataBind();
and in a search i choose to search user, the gridview will be apper with 4 colums, but if i choose the car, the grid will appear with 2 columns, i no need to set the columns of gridview the example of above post:
<%# Eval("id") %>
...
...
So, the gridview will bring the columns dynamically, do you understand now? (sorry for my bad english grammar).
Cheers