Getting data in MyModel.getFirstRow() but not in MyModel.data


I am getting data in MyModel.getFirstRow() but not getting data in MyModel.data.
Any can help me why cannot get data MyModel.data?


Make sure you are using the following syntax   skuid.model.getModel(‘MyModel’).data

I am using same code.

var MyModel=skuid.model.getModel(‘MyModel’);
  
MyModel.getFirstRow();

and

MyModel.data;




Can you provide way to calculate number  of row in data?
I am using below way is it correct?
var Agcontact=skuid.model.getModel(“Agcontact”);
var length=Agcontact.data.length;

To get the number of rows in a Model:

MyModel.getRows().length

Getting the first row in a Model can be done 3 ways (assuming that a Model has at least one row):

1. MyModel.getFirstRow()
2. MyModel.data[0]
3. MyModel.getRows()[0]




I am using below code in my java script for activate condition. But This code is not working properly.It is always fetch old data(The data which i have last saved.)

var LastNamecondition = Agcontact.getConditionByName(‘LastName’);    Agcontact.setCondition(LastNamecondition,‘Vakhariya’,true);
 Agcontact.updateData();

Quick note for the documentation folks: Please include getRows() as a method on the skuid.model.Model document. Thanks!

Matt, this is being done right now, thanks!