D
David Freeman
Hi There!
Below is my VB.NET code...
Dim strSQL As String
strSQL = "SELECT [Name],[Priority] FROM Customers GROUP BY [Country],
[Priority], [Name]"
Dim oleConn As OleDbConnection = Nothing
Dim oleAdapter As OleDbDataAdapter = Nothing
Dim objDataSet As DataSet = Nothing
Dim strResultTable As String = "Customers"
oleConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +
"Data Source=" + Server.MapPath("Test.mdb"))
oleAdapter = New OleDbDataAdapter(strSQL, oleConn)
objDataSet = New DataSet
oleAdapter.Fill(objDataSet, strResultTable)
oleConn.Close()
With myDataGrid
.DataSource = objDataSet.Tables(strResultTable)
.DataBind()
.Columns(1).Visible = False '<< Not Working!!!!
end with
I tried to hide the second column by...
.Columns(1).Visible = False
But the column does not hide! Why?
I've also tried the following in my HTML section...
<aspataGrid runat="server" id="myDataGrid">
<Columns>
<asp:BoundColumn DataField="Priority"
Visible="False"></asp:BoundColumn>
</Columns>
</aspataGrid>
And still the column does not hide.
This is driving me nuts! Plz help!!!!
Thank you all in advance!
David
Below is my VB.NET code...
Dim strSQL As String
strSQL = "SELECT [Name],[Priority] FROM Customers GROUP BY [Country],
[Priority], [Name]"
Dim oleConn As OleDbConnection = Nothing
Dim oleAdapter As OleDbDataAdapter = Nothing
Dim objDataSet As DataSet = Nothing
Dim strResultTable As String = "Customers"
oleConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +
"Data Source=" + Server.MapPath("Test.mdb"))
oleAdapter = New OleDbDataAdapter(strSQL, oleConn)
objDataSet = New DataSet
oleAdapter.Fill(objDataSet, strResultTable)
oleConn.Close()
With myDataGrid
.DataSource = objDataSet.Tables(strResultTable)
.DataBind()
.Columns(1).Visible = False '<< Not Working!!!!
end with
I tried to hide the second column by...
.Columns(1).Visible = False
But the column does not hide! Why?
I've also tried the following in my HTML section...
<aspataGrid runat="server" id="myDataGrid">
<Columns>
<asp:BoundColumn DataField="Priority"
Visible="False"></asp:BoundColumn>
</Columns>
</aspataGrid>
And still the column does not hide.
This is driving me nuts! Plz help!!!!
Thank you all in advance!
David