N
nuhura01
Hi all..
I have a datagrid in my system and I preview the datagrid in other
html page. Below are the code that I'm using:
Dim oStringWriter As System.IO.StringWriter = New
System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New
System.Web.UI.HtmlTextWriter(oStringWriter)
Me.ClearControls(DataGrid1)
DataGrid1.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End
The datagrid that I've created contains a ButtonColumn (Select) in the
first column. The problem is that the above code will preview the
whole datagrid(all columns) while I don't want to preview the first
column. I want to preview the other columns which contains the data.
I don't want to set at the html code:
<asp:ButtonColumn Visible="true" Text="Select" CommandName="Select">
since this may hide the ButtonColumn view at the system. I only to
hide it at the preview page.
Is there any way to do this at the code-behind of the asp.net web
form?Any help is greatly appreciated.
Thanks.
I have a datagrid in my system and I preview the datagrid in other
html page. Below are the code that I'm using:
Dim oStringWriter As System.IO.StringWriter = New
System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New
System.Web.UI.HtmlTextWriter(oStringWriter)
Me.ClearControls(DataGrid1)
DataGrid1.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End
The datagrid that I've created contains a ButtonColumn (Select) in the
first column. The problem is that the above code will preview the
whole datagrid(all columns) while I don't want to preview the first
column. I want to preview the other columns which contains the data.
I don't want to set at the html code:
<asp:ButtonColumn Visible="true" Text="Select" CommandName="Select">
since this may hide the ButtonColumn view at the system. I only to
hide it at the preview page.
Is there any way to do this at the code-behind of the asp.net web
form?Any help is greatly appreciated.
Thanks.