|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid colum has no Dataformat propertyI am writing a webpage in VB.net.
I cant access the dataformat property of a column in the datagrid. But I get this error in Visual Studio : DataFormat is not a member of System.Web.UI.WebControls.DataGridColumn Actually DataGridColumn is an abstract class. The Column
in DataGrid should one of its inherited 'Column' classes, BoundColumn, TemplateColumn, HyperLinkColumn, ButtonColumn, or EditCommandColumn. DataFormatString is member of either BoundColumn or HyperLinkColumn, but not of others. You should know the specific type of the column you want to access. Only if it is BoundColumn or HyperLinkColumn, you can access its DataFormatString property by first casting the column to its specific type. HTH, Elton Wang >-----Original Message----- System.Web.UI.WebControls.DataGridColumn>I am writing a webpage in VB.net. > >I cant access the dataformat property of a column in the datagrid. > >But I get this error in Visual Studio : > >DataFormat is not a member of Show quoteHide quote >. > So you can't do it for columns that you Autogenerate with on a datagrid.
"Elton Wang" <anonym***@discussions.microsoft.com> wrote in message news:<25f801c51493$98fe5540$a501280a@phx.gbl>... you want to access. Only if it is BoundColumn or Show quoteHide quote > HyperLinkColumn, you can access its DataFormatString > property by first casting the column to its specific type. > > HTH, > > Elton Wang
How to pass the selected row of a datagrid to another form
Datagrid Dropdownlist in default in edit mode "parent / child" datagrids How To Insert ASP.NET User Control into DataGrid Column? Adding CSS to LinkButton JavaScript confirmation Set column names to template grid at runtime HyperLink column datagrid Add header text dynamically in a datagrid with templatecolumns? Can we put ActiveX Control into the DataGrid Column? |
|||||||||||||||||||||||