A
Andrew
I am trying to set the column information - which ones I want displayed and
how with the web grid control. The interface has some big differences when
compared to the winform.
Is this possible without having the dataset match ? I think yes... but ...
here's how I approached it: ( create new DataGridColumns, add properties and
then add each to the data grid. BUT I get an error when I try this:
C:\Inetpub\wwwroot\logvue\WebLogMgr.cs(192): Cannot create an instance of
the abstract class or interface 'System.Web.UI.WebControls.DataGridColumn'
if I dedclare it like without the new, then its says dgCol is unassigned and
wont complile. So what should I do ??? Thanks
for (int i =0;i< numCols;i++)
{ System.Web.UI.WebControls.DataGridColumn dgCol = new
System.Web.UI.WebControls.DataGridColumn();
dgCol.ItemStyle.Width=Convert.ToInt16(tabStyles.table[tabIndex].columns.width);
dgCol.HeaderText=tabStyles.table[tabIndex].columns.headertext;;
gridTX.Columns.Add(dgCol);
}
how with the web grid control. The interface has some big differences when
compared to the winform.
Is this possible without having the dataset match ? I think yes... but ...
here's how I approached it: ( create new DataGridColumns, add properties and
then add each to the data grid. BUT I get an error when I try this:
C:\Inetpub\wwwroot\logvue\WebLogMgr.cs(192): Cannot create an instance of
the abstract class or interface 'System.Web.UI.WebControls.DataGridColumn'
if I dedclare it like without the new, then its says dgCol is unassigned and
wont complile. So what should I do ??? Thanks
for (int i =0;i< numCols;i++)
{ System.Web.UI.WebControls.DataGridColumn dgCol = new
System.Web.UI.WebControls.DataGridColumn();
dgCol.ItemStyle.Width=Convert.ToInt16(tabStyles.table[tabIndex].columns.width);
dgCol.HeaderText=tabStyles.table[tabIndex].columns.headertext;;
gridTX.Columns.Add(dgCol);
}