question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

binding an object to column

See original GitHub issue

Hi !,

I’m getting data set from a web-service and once of filed returning an object similar to bellow code

CusName:{Id:1 ,Name:"Test Name"}

so I have to show the Name of object in the cells, right now it showing ass [object], if anyone can help me to figure this would be appreciate,

image

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

20reactions
diegoalexcommented, Jan 19, 2018

Hi @thilankascentic , you can use the “valuePrepareFunction” parameter in your columns :

      CusName: { 
        title: 'Customer Name', 
        valuePrepareFunction: (data) => {
                                   return data.name;
                               },
      },
4reactions
charbonnier666commented, Nov 14, 2018

Hi @thilankascentic , you can use the “valuePrepareFunction” parameter in your columns :

      CusName: { 
        title: 'Customer Name', 
        valuePrepareFunction: (data) => {
                                   return data.name;
                               },
      },

Hi, it works but if I want to put more than 1 property? I can’t replicate “CusName”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binding an object to a datagrid column - Stack Overflow
How do I bind the field firstname inside the person object with the column First Name ? c# · wpf · data-binding ·...
Read more >
Creating a binding object for a column - IBM
To create a binding object for a column, create an array of YRCTblClmBindingData[] with an array size equal to the number of columns...
Read more >
Bind column filed from an object value in Kendo UI for jQuery
Bind column filed from an object value. 1 Answer 179 Views ... I have done binding as show below but Job and Salary...
Read more >
Entities and Column Binding - Ktorm
The core feature of an ORM framework is to bind database tables to entities, bind tables' columns to entities' properties. Now let's learn...
Read more >
Columns object Parameter Binding - Angular - EJ 2 - Syncfusion
I'm dynamically loading the grid columns at runtime from json config data. All is well, however I'm not able to bind the column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found