This is a migrated thread and some comments may be shown as answers.

Grid- General Questions

3 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Parag
Top achievements
Rank 1
Parag asked on 05 Feb 2019, 02:13 AM

Hi,

     1) Is there any property available in grid to show and hide entire grid?

     2) Is there any way to dynamically add column in grid? For example : I want to provide pop up box where will provide column list apart from the column which exist in the grid and on selection of those column, it should directly get added in grid.

 

Regards,

Parag

 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Feb 2019, 08:47 AM
Hello, Parag,

Regarding the questions:

1) The Grid can be shown and hidden using the React approach to show or hide element based on the state:

{this.state.isGridVisible && <Grid/>}

2) As for the columns, we can an example with the column menu that shows the same:

https://www.telerik.com/kendo-react-ui/components/grid/columns/column-menu/#toc-custom-components

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Parag
Top achievements
Rank 1
answered on 18 Feb 2019, 09:31 PM

Hi Stefan,

Thanks for the above clarification.

Do you have any example to add row in grid between the rows.

For example : I have button in row of grid. once clicked on the the button it should immediately add row next to it, instead of appending at last 

Regards,

Parag

 

0
Stefan
Telerik team
answered on 19 Feb 2019, 08:40 AM
Hello, Parag,

This is connected to how the item is added in the data array. The Grid shows the data as it is in the array.

When a row is clicked, check the index of the current row item and add the new after it:

https://stackoverflow.com/questions/586182/how-to-insert-an-item-into-an-array-at-a-specific-index-javascript

There is a row click event which will return the item:

https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-onrowclick

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Parag
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Parag
Top achievements
Rank 1
Share this question
or