I believe that you need to pass an object array, not a string array (so just manually box each item in the array, or pass newData |> Array.map box as the second parameter). Normally, you'd get a compiler error here; however, since the last argument to the method is actually a params array, the compiler is treating the whole array as an object which is being implicitly packaged up into a new object [] and passed to the method.

EDIT - Or, even better, use your approach and pass each string as a separate argument.

Keith

By on 2/4/2010 10:20 PM ()

An update on this just in case anyone cares. This works. Manually boxing the array values also works. Thanks Keith

self.GridView.Rows.Insert(irow, (newData |> Array.map box))

By on 2/16/2010 8:56 PM ()

Well ok, I am stupid. The values: obj[] type for the 2nd parameter of Insert() is actually a parameter array which in F# must be passed to the function individually. So the insert function actually looks like this.

GridView.Rows.Insert(0, "Column1", "Column2")

By on 2/4/2010 10:19 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper