Author Topic: rowIndx from tableToArray  (Read 2610 times)

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
rowIndx from tableToArray
« on: May 01, 2018, 12:47:49 am »
Hi,

I was curious what is the appropriate binding for rowIndx,  I have tried the following but seems like it is not being recognized.

var obj = $.paramquery.tableToArray(tbl);

newObj.dataModel = { rowIndx: obj.data[0], data: obj.data };
newObj.dataModel = { rowIndx: "ID", data: obj.data };

Thanks!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: rowIndx from tableToArray
« Reply #1 on: May 01, 2018, 07:06:37 am »
dataModel doesn't have any property rowIndx.

https://paramquery.com/pro/api#option-dataModel

May I know what you are trying to do with rowIndx?
« Last Edit: May 01, 2018, 07:10:22 am by paramquery »

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: rowIndx from tableToArray
« Reply #2 on: May 01, 2018, 08:54:00 am »
Using: ASP.net MVC

I was using a model from my controller returning my view, using the html table it kicked out, I then made my grid, was hoping that I could just use the existing DOM objects made by my model and just piggy back ParamQuery on my view.

Just checking if it were possible, ended up just redoing the controller feeding from my REST.  Trying different variations and flavors of configurations...

Thanks for the response :)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: rowIndx from tableToArray
« Reply #3 on: May 01, 2018, 09:22:19 am »
tableToArray is fine to generate a read only grid for reporting purpose from an html table but doesn't have much flexibility if you want to write grid data changes back to database.

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: rowIndx from tableToArray
« Reply #4 on: May 01, 2018, 06:52:51 pm »
Thanks for the quick reply!