Hopefully something simple again here. I'm looking to display some data in a DataView but I need to hide certain fields from the data source (namely the ID of the record).
Now my code currently looks like this:
<asp:SqlDataSource ID="AC_HistoricalRecord" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"
SelectCommand="SELECT * FROM vw_OAS_HistoricalReports WHERE ([OAS Record ID] = @RecordID)">
<asp:QueryStringParameter Name="RecordID" QueryStringField="RecordID" Type="String" />
<asp:DetailsView ID="HistoricalAftercare" AutoGenerateRows="false" DataSourceID="AC_HistoricalRecord" runat="server" CssClass="table table-striped table-bordered" ></asp:DetailsView>
No code behind at present but I believe this is how I'll need to perform this job? Hopefully someone can advise how I go about taking this code and make it work for me.
The column I wish to remove is [OAS Record ID]
I'm also looking for a way to hide rows that are essentially NULL. So only display the whole row if there is any data in the row. I have my SQL doing this in the background but the row is still appearing in my DataView so I'm guessing that I need to do something programmatically again to not display these rows if the data value is NULL?
Hope you can help.