Skip to content

Replies

0
Silvia Ivanova
Silvia Ivanova answered on Dec 8, 2022 9:21 AM

Of course. Thank you for the link!!! Thank you for your amazing help!

0
Silvia Ivanova
Silvia Ivanova answered on Dec 8, 2022 8:59 AM

Hello Riva,

I also have action buttons for editing a selected cell. Is it possible to save this feature in the state?

    
      
        
{{cell.value}}

Example: https://stackblitz.com/edit/angular-khqx8m-wrhrmu?file=src/app/igx-sample/igx-sample.component.html

When I save the user's preferences for sorting, filter etc. and reload the page, then the action buttons disappear.

0
Silvia Ivanova
Silvia Ivanova answered on Dec 7, 2022 10:46 AM

Hello Riva, many thanks for the amazing example. Is it possible to use those date formats with the Grid State Persistence? I save the user's filters, sorting etc. but when I reload the page, then the date format is also changed.

Here is an example:
https://stackblitz.com/edit/angular-khqx8m-tyya7h?file=src%2Fapp%2Figx-sample%2Figx-sample.component.ts,src%2Fapp%2Figx-sample%2Figx-sample.component.html

0
Silvia Ivanova
Silvia Ivanova answered on Dec 6, 2022 8:46 AM

Thank you very much. Your sample is exactly what I need. I have one more question.

I am using excelStyleFilter as filterMode. Is it possible to display the dates in reverse order? I mean, e.g. December 2021 at the top of the list and January 2020 at the bottom. Now I have the months of 2020 at the top and the months of 2022 at the end.

Here is the modified sample: https://stackblitz.com/edit/angular-khqx8m-wtrokz?file=src%2Fapp%2Fdata%2Fdata.ts,src%2Fapp%2Figx-sample%2Figx-sample.component.ts,src%2Fapp%2Figx-sample%2Figx-sample.component.html

I hope you can help me. Thank you.

0
Silvia Ivanova
Silvia Ivanova answered on Mar 11, 2022 12:50 PM

Okay, I understood what the problem was. In your example the 'data' is extended with the 'Locations'. I have a complex 'data' and I cannot extend it. Maybe there is no other solution to use the object 'Locations' without extending the 'data'.

0
Silvia Ivanova
Silvia Ivanova answered on Mar 9, 2022 6:35 PM

I found out that my selectElements is empty.  There is why the length of the selectElements is equal 0. Maybe the right question would be: "How can I select all items from a column of igx-grid?". I read that selectElements.item(i) does not work for Angular, but Visual Studio suggests me to use it. Maybe you can help me?

0
Silvia Ivanova
Silvia Ivanova answered on Mar 9, 2022 6:53 AM

Hello , thank you for the example. I tried it for my project, but unfortunately it did not work. I got an error "Element may be null" in the .ts-file on line:

(selectElements.item(i).children[0] as any).style.width = '420px';.

 I tried to change it to:

 

(selectElements.item(i)?.children[0] as any).style.width = '420px';

and also I tried to check if the element selectElements.item(i) is equal to null. Both solutions did not work.

Is there any other way to change the width of the igx-select? Thank you!