Grid with Server DS

Hi,

I am using SmartGWT 2.5. Currently i am exploring binding server data source with a Grid. I was successful doing it by following the details mentioned in one of the showcase examples i.e.

  1. Create a grid,
  2. associate fields to the grid,
  3. create a server DS (implement 4 methods fetch,update,add,remove)
  4. Define the DS fields in an XML with the “serverConstructor” attribute pointing to the the server DS.

After doing all the above it works just fine. Later i wanted to do away with the XML and wanted to create the Datasource in the client side code, add all the fields,etc, but i don’t seem to find a way to set the serverConstructor value via code to bind it with my server DS.

Any idea how this can be done?

Thanks in advance.
Vicky

This doesn’t make sense, because it would be a security issue to set properties that control server behavior from client-side code.

Why did you start down this path? Have you read the QuickStart Guide’s Server Framework chapter (especially that critical first section)?