PHSUser Posted September 8, 2008 Report Share Posted September 8, 2008 I'm replacing a third-party grid with the GridFX grid, and I'm running into a bit of trouble. I'm getting the error "DataSource was set to an object that does not implement IEnumerable." when trying to bind the grid to a data table. Am I missing something simple? Here's an example of the code Dim dtMPNS As DataTable dtMPNS = Common.GetDataTable(lstMPNS, objectProperties) grdMedication.DataSource = dtMPNS grdMedication.DataBind() <-- error occurs here Thanks in advance Quote Link to comment Share on other sites More sharing options...
StephenP Posted September 9, 2008 Report Share Posted September 9, 2008 Just change the line to grdMedication.DataSource = dtMPNS.DefaultView Should be fine. Thanks! Quote Link to comment Share on other sites More sharing options...
PHSUser Posted September 9, 2008 Author Report Share Posted September 9, 2008 Perfect! Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.