GridView Asp.net อยากทราบว่าหากไม่ให้ข้อมูลมันทับกันต้องทำยังไง
ใชการ Create Control ครับ เช่น
Code (VB.NET)
'*** Create DataGrid ***'
Dim myDataGrid As New DataGrid
With myDataGrid
.AutoGenerateColumns = True
.DataSource = DataSource()
.DataBind()
End With
Me.pnlMain2.Controls.Add(myDataGrid)
ASP.NET Controls.Add
Date :
2014-01-18 09:12:36
By :
mr.win
Code (C#)
SqlDataAdapter adapter = new SqlDataAdapter(
"SELECT * FROM Customers; SELECT * FROM Orders", connection);
adapter.TableMappings.Add("Table", "Customer");
adapter.TableMappings.Add("Table1", "Order");
adapter.Fill(ds);
//Count Table in ds
// Create object panel
//Start Loop by table length
//create object gridview
//panel.controls.add(gridview)
//gridview.datasource = ds.tables["TableName"]
//End Loop
**** Another example http://www.java2s.com/Code/VBAPI/System.Data.SqlClient/SqlDataAdapterTableMappingsAdd.html
Date :
2014-01-20 10:41:08
By :
oami
Load balance : Server 03