I need to be able to fill a particular column of an igGrid with a specific background color and have no padding. I don't want to affect any other columns.
In the dataRendered event I have tried the following (plus many more), but I still have padding around my cell content. How do I remove all padding?
ui.owner.element.find("tr td:nth-child(2)").css("padding", 0);
ui.owner.element.find("tr td:nth-child(2)").css("background-color", "red");
Hello hrwebb,
Thank you for posting in our forums!
I have a few questions about this. First, do you have any additional CSS on the page that may be interfering with this somehow?
And second, are you sure you are seeing padding and not the margins or the border? I have put together a quick jsFiddle here using the code you provided and the only thing I notice is the horizontal border between the cells. If this is the same result you are seeing, you can comment out the line in my dataRendered handler to remove the border.
Please check out my fiddle and let me know what may be different with your page. And feel free to modify the fiddle and update me, or provide your own sample that reproduces the issue.
Looking forward to hearing from you.
I want to thank you for your research into the problem. Using your example caused me to try some different things which finally led to the solution.
Hi hrwebb,
You're welcome! I'm glad I was able to help you find a solution.