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.

Need to change 'idProperty' used in grid

See original GitHub issue

Issue Description

I use Slickgrid very powerfully. I think many functions are working normally and are grid with good performance such as rendering speed. But there’s one problem that’s been bothering me for a very long time. The value of idProperty used in the grid is id. I don’t think it’s just me. Let me give you an example that I use.

스크린샷 2019-03-28 오전 12 24 49

I’m using a grid in a kind of database tool and I’m using it to express the results of SQL.

I ran a very simple SQL(select "id", 1, 1, 1;).

스크린샷 2019-03-28 오전 12 23 31

Reproduce situations where problems can occur.

SQL that can cause grid errors

select "id", 1, 1, 1 union select "id", 2, 2, 2 union select "id", 3, 3, 3

스크린샷 2019-03-28 오전 12 23 04

I have given a simple example, but I actually think that the primary key of several tables can be ‘id’.

What I want to say here is simple.

Q1. @6pac Is it possible to change the value of ‘idProperty’ to a value that will not overlap?

Currently, I am using the value by changing it directly. That made it difficult for me to use the plugins. Help me. 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

6paccommented, Mar 27, 2019

Yep, agree with @ghiscoding, looks like setItems is the way to change the idProperty. I don’t think a PR is needed, since you’re always going to be using setItems at some point to initialise the data.

ghiscodingcommented, Mar 27, 2019

use setItems(dataset, objectIdProperty) like shown in this line, that is when you create the DataView instance and you pass it the dataview. The objectIdProperty is really how to override the id and it’s optional, so if you don’t pass it, then it will use id. So unless I misunderstood, that is the way to go

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can you set multiple idProperty fields in Dojo Grid?
I'm using a Dojo Grid to display the features selected on a map. I wonder if it's possible to have more than one...
Read more >
The data grid component requires all rows to have a unique ...
You can use this in dataGrid props: getRowId={(row) => row. ... Datagrid needs an id so you need column named "id" so (row)...
Read more >
Add Field and Id property in Grid's ColumnState
It will be useful if the grid column state contains the Field parameter if such is specified. This will make easier mapping the...
Read more >
[DataGrid] Create prop to map required id to another field in ...
As a Developer my data set may contain a uniquely identifying field that is not called "id" (i.e. "application_id"). If the data set...
Read more >
dxDataGrid - Why is the id property is not commited to a Web ...
Hello, I have the folllowing datagrid: ... dxDataGrid - Why is the id property is not commited to a Web API Server ......
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 Post

No results found

github_iconTop Related Hashnode Post

No results found