or
SqlDataSource
objects (for example SqlDataSource1
in the code sample :<asp:SqlDataSource ID=
"SqlDataSource1"
ConnectionString=
"<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName=
"System.Data.SqlClient"
SelectCommand=
"SELECT CustomerID, ContactName, ContactTitle, City, Country, Bool FROM Customers"
runat=
"server"
></asp:SqlDataSource>
If
e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then
Dim record As table 1 = e.Item.DataItem<----------
nav select {
display
:
none
;
}
nav RadComboBox {
display
:
none
; }
@media (
max-width
:
800px
) {
nav ul {
display
:
none
; }
nav select {
display
: inline-
block
; }
nav RadComboBox {
display
: inline-
block
; }
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
// bind
grid.MasterTableView.DataBind();
grid.DataBind();
// columns
var cols = grid.MasterTableView.Columns;
foreach
(GridColumn c
in
cols)
{
c.Visible =
false
;
}
// fieldNames is a comma delimited list of column names in the correct order
var fields = fieldNames.Split(
new
char
[
','
]);
for
(var j = 0; j < fields.Length; j++)
{
var c = cols.FindByUniqueNameSafe(fields[j]);
if
(c !=
null
)
{
c.Visible =
true
;
c.OrderIndex = j;
}
}
}
}