email@example.com Posted February 19, 2008 Report Share Posted February 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.