Announcement

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

    How to get value of a column in first row of a datasource

    I have SmartGWT 2.2. i have a datasource the pulls data from the server correctly. I am using fetchData to do the retrieval from the server.

    I want to access a column ("status_code") from the first row of the data returned.

    I suppose that I can use getAttributeAsString("status_code") but how do I reference the first row of the datasource?

    #2
    Try this,
    Code:
    int rowCount = grid.getRecords().length;
    for (int i=0; i < rowCount; i++) {
    
    Record record = grid.getRecord(i);
    record.getAttribute("statusCode")					
    					
    }
    Thanks,

    Comment


      #3
      Thank you!

      Comment

      Working...
      X