Home Forums WinForms controls Xceed Grid for WinForms Xceed Grid in Client/Server application

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #12642 |

    Anyone tried to use this Grid in an Client/server application?
    (.NET Remoting)

    What is the best way to present data in the grid?

    What is the best way to transfer data(griddata) from client to server, and back again?

    Any best practices?

    I have one demand: My users must have the possibility to edit all the cells in the grid.

    Regards
    C#

    Imported from legacy forums. Posted by C# (had 3022 views)

    Odi [Xceed]
    Spectator
    Post count: 426

    Hang tight, we’re soon going to mail out our newsletter announcing the forums – that will surely get your post seen by many and perhaps responded to. (Next week..)

    Imported from legacy forums. Posted by Odi [Xceed] (had 342 views)

    User (Old forums)
    Member
    Post count: 23064

    I have no experience with .NET remoting, but I’m working on a client/server application that uses web services. I think you can use XML to transfer the data.

    Server -> Client:
    <b><table><row field1=”abc” field2=”123″/><row field1=”def” field2=”456″/></table></b>

    – Clear the <i>DataTable</i>, attached to the grid.
    – Use an <i>XmlReader</i> to read the XML-data, and add <i>DataRow</i>s to the <i>DataTable</i>.
    – Call the <i>AcceptChanges</i>-method of the <i>DataTable</i>.

    Client -> Server:
    – Call the <i>GetChanges</i>-method of the <i>DataTable</i> to get a new <i>DataTable</i> containing only the changed rows.
    – Use a <i>StringBuilder</i> to create the XML-string, beginning with <b>”<table>”</b>.
    – For each row in the <i>DataTable</i> (changed): <b>”<row state=’u’ field1=’abc’ field2=’124’/>”</b>.
    – This element has an extra attribute ‘state’: u = update, i = insert, d = delete.
    – To know what state to use: check the <i>RowState</i>-property of the <i>DataRow</i>.
    – Add <b>”</table>”</b> to the <i>StringBuilder</i>.
    – Send the XML-data (<i>StringBuilder</i>.<i>ToString()</i>) to the server.
    – Call the <i>AcceptChanges</i>-method of the <i>DataTable</i>.
    – Example:
    <b><table><row state=”i” field1=”abc” field2=”123″/><row state=”u” field1=”def” field2=”456″/></table></b>

    Hope this helps a bit.

    Imported from legacy forums. Posted by Tommy (had 4417 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.