Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    data set from webservice

    Hi all,

    I want to get a data set from web service containing a table of two fields and 5 records and populate 10 textarea controls. each record for two textarea controls. for a single list grid you can set data source property and populate the fetched data. Is there any similar easy method to populate 5 records to 10 text area controls with each record to 2 text area controls.

    Also I want to update back the data.

    thanks all
    devaraja

    #2
    Hi Devaraja,
    The text areas will have to be shown in DynamicForm instances.
    A DynamicForm allows you to edit a single record at a time from a DataSource. For information on how this works see docs on databound components and DynamicForm.editRecord().

    This means that to show textAreas for 5 records on the page, you would need to create 5 separate DynamicForm instances, bind each one to your dataSource, and call 'editRecord(...)' passing in the appropriate record in each case.

    Note that a more typical UI for this kind of thing would be to show a single dynamicForm allowing the user to edit one record at a time and provide an interface for the user to change which record is being edited. This is the appropach demonstrated in the Sample Application

    Thanks
    Isomorphic Software

    Comment


      #3
      data set from webservice

      Thanks for reply but more specifically I want to know how to get Data set
      from web method returning DataSet object and process the 5 records to fill
      values to text area controls.
      If getfetchDS method can return DataSet I want to know how to process that
      returned dataSet that mean to read record by record and fill the record values to corresponding textarea.

      var schoolDS = distCodeService.getFetchDS("GetListOfSchools_Custom", null, { recordXPath:"//Table" });

      how to process and read records in schoolDS to fill those values to textAreas

      Thank you
      devaraja

      Comment


        #4
        Hi Devaraja,
        getFetchDS() returns a DataSource rather than an actual set of records.

        If you want to retrieve data directly from a datasource, you can call DataSource.fetchData().

        If this doesn't give you enough information, could you give us a better idea of exactly what you're doing in your application. Specifically:
        - How is your data stored on the server
        - What DataSources do you have defined,
        - How do you need to present it to the user
        - Do you need it to be editable
        (and anything else that might be relevant to give us a good overview of what you're trying to do).

        Thanks
        Isomorphic Software

        Comment


          #5
          data set from web service

          Hi,

          The data is stored in sql server and in a webmethod I use a query and return a Dataset object. The return type of this web method is DataSet implemented in .Net . The query used in webmethod will return 5 records each record having 2 fields. This result is returned from the method as a DataSet. Most important Webmethod takes three arguments from client side.

          At the client side I want to use this web method that returns DataSet and
          get these 5 records and fill the text area controls. first record to first two text Area controls. 2nd record to 2nd set of text area controls and so on upto 5 records.

          Thanks
          devaraj

          Comment


            #6
            Hi Devaraja
            If you haven't already, we recommend you start by reading the documentation on SmartClient client-server integration. This gives you an overview of the process of integrating with your back-end data model.
            In your case, you're connecting to a .net back-end - you should also check out the documentation for client side integration..

            You should also take a spin through the server integration examples, in the SDK at http://localhost:8080/examples/server_integration/

            Broadly speaking the best approach for you is probably:
            - create a DataSource that describes the structure of your records, and has a dataURL specified.
            - have the server respond to requests to the dataURL by serving up your data in XML or JSON format. So you'll probably be serializing your server-side DataSet into XML.

            You can then use various methods to retrieve the data from the server in your application - if you just want to retrieve every record in the list, you can call fetchData(...) on the DataSource directly, and then have your callback function actually put those values into DynamicForm instances.

            Comment


              #7
              Hi,
              i am using .net as well so far i am able to insert new rows and fetch data with a ListGrid and still have to fix delete and update operation.
              but was thinking since i saw many posts about smartclient usage with .net why no share information over an irc channel (something like: #smartclient on freenode) that way we can help each other and it would be faster for all of us to fix problems
              regards

              Comment

              Working...
              X