Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I implemented my grid using jquery with support of jquery widgetes.
Now i wanted customize my grid colors. What is the procedure?.
I am getting confusion with bulk code.

Thanku.
Posted

1 solution

There can be two ways to implement style changes in jQuery widgets, with respect to your problem.

1. Every grid is rendered using table elements as a base. So, one ways can be just identify the id of your grid and the table structure associated with it. And, add your css based on those table element after identifying your rows and columns.

2. If in case grid is generated through customization in div elements, there is always a class associated with each component of a jquery widget. So, whatever is rendered in your grid, each coloum, row and data must have been associated with a class.

You can identify those classed through observing generated source of your page either useing firebug or any other tool, or simply by viewing source through browser. And them write the css based on those classes.
And, if there is css file with the jQuery widget you can also check and and make some changes to css.


The better way I feel and usually follow is
1. Check the rendered element in firebug, and check which class has been associated to that element through the widget.
2. If a css file exists with the widget, find the style defined for that class and append some style to that class.
3. If no css file exists for that widget, just add a class with same name and add you custom style to that putting that in your page or referenced stylesheet for that page.

I hope this would help.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900