-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Row details displays undefined rows #1092
Comments
it was never created to be used that way and is not supported either, you also can't register/unregister that way because it doesn't use the regular SlickGrid registering process and that simply won't work. I thought the following code might work angularGridReady(angularGrid: AngularGridInstance) {
this.angularGrid = angularGrid;
}
get rowDetailInstance(): SlickRowDetailView {
// you can get the SlickGrid RowDetail plugin (addon) instance via 2 ways
// option 1
return (this.angularGrid.extensions.rowDetailView.instance || {});
// OR option 2
// return this.angularGrid?.extensionService.getExtensionInstanceByName(ExtensionName.rowDetailView) || {};
}
later() {
this.rowDetailInstance.dispose(); // to unsubscrive events & avoid mem leaks
this.rowDetailInstance.init(this.angularGrid.slickGrid); // reinitialize the plugin
} but it doesn't work and is causing different error (Maximum call stack size exceeded). Let's put it this way, Row Detail is created once and only once and if you're creating the columns dynamically in a later process, I think you're looking for trouble. I don't have more time to spend on this and so at this point I would say Row Detail is not supported dynamically |
hi ghiscoding! thanks for this. okay I'll just create the slickgrid instance when I have the columns and rows for it :) |
but really what's the point of initializing a grid without columns? Why don't you just use an |
yes ill do that :D |
hello @ghiscoding ! Applying a column preset from the slickgrid config makes these |
Sorry but why are you reopening this issue when the new issue you are describing is completely different from the original? Please don't hack old issue just to save time when it's totally different. You are also missing a lot of details that I require for troubleshooting
I'm going to close this issue again because like I said your new issue has nothing to do with the original issue and I don't think this issue is happening with latest version, please provide reproduceable code in the future and the version you're using. EDIT I gave it a try with // get all columns (visible + hidden) including dynamically created columns
const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
console.log(JSON.stringify(allColumns.map(c => ({ columnId: c.id })))); in the Row Detail example this will output [{"columnId":"_checkbox_selector"},{"columnId":"_detail_selector"},{"columnId":"title"},{"columnId":"duration"},{"columnId":"percent2"},{"columnId":"start"},{"columnId":"finish"},{"columnId":"effort-driven So presets: {
columns: [
// { columnId: '_checkbox_selector', width: 30 },
{ columnId: '_detail_selector', width: 30 },
{ columnId: 'title' },
{ columnId: 'duration' },
{ columnId: 'start' },
{ columnId: 'finish' },
{ columnId: 'percent2' },
{ columnId: 'effort-driven' }
]
} Technically you should also include the Row Selection column ( Summaryin summary, the lib should probably handle this hidden/dynamical columns, but for now this is the workaround that you have to do. I might fix it in the future but for now this is an acceptable workaround. There also seems to be a bug with an extra checkbox icon that shouldn't appear in the filter section on that Row Detail column but is a separate bug (basically this plugin was not tested with other plugins). Also again, please do not hijack old issue with new issues that are unrelated to each other and provide more info in the future EDIT 2 The fix is now released under the new version |
- fixes issue brought in comment under issue #1092 - there are 3 dynamically created columns (RowMove, RowSelection & RowDetail) and all 3 should be auto-inserted when columns presets are used - the 2nd issue will be fixed in Slickgrid-Universal, the issue is when Row Detail & Row Selection are used together, an extra checkbox appears in the filter section of the RowDetail column when it shouldn't
thank you so much for this |
you can thank me by staring ⭐ the lib if you haven't already 😉 |
yes <3 i just did |
Describe the bug
Hi! I tried implementing the detailed row feature. But clicking a row only shows new lines with undefined values

Checking the click event of the plugin shows that I got 0

container_*
classesI was wondering if I could reinitialize the plugin? I have a dynamic dataset that changes from one to the other with different set of columns and rows using the same slickgrid instance.
I tried the .invalidate() but it doesn't reinitialize the plugins. Also tried this function i found, but it relies on a different class with the same name i think.

Reproduction
I followed the tutorial on how to use it. i think it happens because after the slickgrid was initialized with no column headers and data. i gave the user an option to generate the data with dynamic columns and apply it in slickgrid
Expectation
No response
Environment Info
Validations
The text was updated successfully, but these errors were encountered: