Jump to content
Software FX Community

richard.anthony@cfp-software.c

Members
  • Posts

    2
  • Joined

  • Last visited

richard.anthony@cfp-software.c's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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.
  2. Hi, Support team; I am trying to use Gridfx in a way which uses a single grid and re-binds to different SQL statements depending on user input, and thus will need to show different fields as a result of the change in datasource... The way I have gone about it is to create an sql datasource and by default bind the grid to that source, then when appropriate to change the sql datasource's "SelectCommand" property... But then I get stuck! I have tried re-binding the control but get runtime errors indicating that the original field names are no-longer available. I have tried programatically clearing all the datafields (grid.datafield.clear) then adding datafields via creating a new instance of a datafield class and datafield.add(reference to instance) which appears fine via the runtime object explorer, but at runtime still fails with a similar message ("Empty Property 'DataPathDescriptor' - GridField originaldatafieldname' is bound to the 'originalsqlfieldname' DataPath but had no DataPathDescriptor set."). I could obviously do the whole thing unbound - but surely there is a faster way? I'm pretty sure that the grid.datafields.clear() isn't doing what I think it should - but can't find an answer (I'm using vb under asp.net, by the way). I admit that I'm new to asp.net, but have about 20 years industrial development experience so am beginning to beat myself up that I can't figure it out! Please put me out of my misery - how should I do it?... Yours hopefully... Richard Anthony
×
×
  • Create New...