in the Page Load event, I have;
Select Case UCase(Request.QueryString("Display"))
Case "WORKSHEETS"
Me.grdfxOrganiserSubGrid.DataBind()
Case Else
Me.grdfxOrganiserSubGrid.Visible = False
End Select
Then, in the grdfxOrganiserSubGrid_DataBinding event, I have;
Dim lDataAdapter As New SqlDataAdapter
Dim gridDataset As DataSet
Dim gridDataView As DataView
lDataAdapter = New SqlDataAdapter
lDataAdapter.SelectCommand = New System.Data.SqlClient.SqlCommand("SELECT LCode, LName, LAdd1, LAdd2, LAdd3, LAdd4 FROM Land_Inf", conMainConnection)
gridDataset = New DataSet
lDataAdapter.Fill(gridDataset, "Land_Inf")
gridDataView = New DataView
gridDataView = gridDataset.Tables("Land_Inf").DefaultView
grdfxOrganiserSubGrid.DataSource = gridDataView
- Which I thought (From the examples I have found) would do the job (Please note that the conMainConnection is a PUBLIC SqlConnection previously defined and opened).
Does't do anything, though!
The markup is:
<GridFX:Grid id="grdfxOrganiserSubGrid" runat="server" DataSourceID="SqlOrganiserSubGrid"
Height="200px">
<titlebar subtitle="Please select above" title="Nothing selected" visible="True">
<Image Icon="None"></Image>
<Style HorizontalAlign="Left"></Style>
</titlebar>
<columns>
<GridFX:FieldColumn Field="Please Select MODE Above"></GridFX:FieldColumn>
</columns>
<datafields>
<GridFX:NumberField ReadOnly="True" DataPath="Please Select MODE Above"></GridFX:NumberField>
</datafields>
</GridFX:Grid>
Where the datasource of SQLOrganiserSubGrid is a simple "select NULL as[Please Select MODE Above]" placeholder.
Thanks for your help thus-far - if you think the hotfix is appropriate for my needs I'd be more than happy to give it a whirl!
- Richard Anthony.
Director of New Developments.