tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Add Classes to Column Header to optimize the Responsive behavior #988

Open atheosangel opened 3 years ago

atheosangel commented 3 years ago

It will be very nice to be able to add a custom CSS class through the colModel to the colum header like to the rows to optimize the Responsive behavior of the grid. For Example. If we add the class "hidden-xs" then i also want be able to add this or another class to the header. Please also add the Class to the Toolbarfilter or add an separate class for this.

/Responsive Design/ @media (max-width: 767.98px) { .hidden-xs { display:none !important; } }

tonytomov commented 3 years ago

Good idea - will see what I can do.

tonytomov commented 3 years ago

Hello,

First of of all Thank you very much for the participation. Unfortunately I will not accept it since:

  1. It is needed to make the changes only on the separate module and not and the generated file
  2. You add class classesResponsive to the data cells, but this is not needed - we already have classes property

Please see my commit - it add a property labelClasses, which should do the job. I have fixed adding the classes to the first invisible row.

Please let me know if this resolves your problem.

Thank again.

Best Regards, Tony

atheosangel commented 3 years ago

Hi Tony,

 

thanks for your reply.

 

It is needed to make the changes only on the separate module and not and the generated file
I don't know this.. sorry.
You add class classesResponsive to the data cells, but this is not needed - we already have classes property
I know that their are this properties. But I added it for more functionality. e.g. you want to style the header in a fancy way(now you may see the first row depending on the style.

But your solution do the job! thanks for the really fast changes.

Since I try the Version 5.5.5 instead of 5.5.0 the height of the grid will differently calculated if the option $.jgrid.defaults.responsive is true. The Property "height" doesn't seems to work like it do in the version before.

 

Let me know if you need some support on the PHP implementation of the grid.

 

Best Regards

Mario

Gesendet: Montag, 31. Mai 2021 um 14:56 Uhr Von: "Tony Tomov" @.> An: "tonytomov/jqGrid" @.> Cc: "atheosangel" @.>, "Author" @.> Betreff: Re: [tonytomov/jqGrid] Add Classes to Column Header to optimize the Responsive behavior (#988)

 

Hello,

First of of all Thank you very much for the participation. Unfortunately I will not accept it since:

It is needed to make the changes only on the separate module and not and the generated file
You add class classesResponsive to the data cells, but this is not needed - we already have classes property

Please see my commit - it add a property labelClasses, which should do the job. I have fixed adding the classes to the first invisible row.

Please let me know if this resolves your problem.

Thank again.

Best Regards, Tony

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tonytomov commented 3 years ago

Hello,

Can you please open another issue and explain in detail the problem. If there is no problem with this one you may want to close it.

Kind Regards, Tony