Every button looked good. I mean, according to the project standards. Every button had that blue gradient background, with bold text. Every button looked good. Except that of the datagrid's EditCommandColumns and ButtonColumns.
Mmmhh... intelligent me, I immediately got down to work and applied the stylesheet property (CssClass, that is) to each buttons on ItemDataBound event of the datagrid.
Neh, it wouldn't budge.
Ha! It could be ItemCreated.... yeah, that is it. ItemCreated. How foolish I could be? Did I forget all those days when I had these memorized in my smart brain?
Select. Copy. Paste.
ItemDataBound event handler replaced with ItemCreated event handler. It should work this time. It should!
What? It doesn't? Why? The code says to apply the stylesheet every time the row is being created. Why not?
Mmmhhh... what should be the next step?
Google!
I was right, even the most reputed forums support that I was right!
What might have happened?
I had to find out. Right-Click. View Source.
Mmmhh.... see... every button in the EditCommandColumn and ButtonColumn had the "class=" already applied... for Edit button, it was "Button_Edit", for update button, it was "Button_Update"... and so on...
And it wouldn't change even if I insist.
Open Style.css. Create a new class for Button_Edit, Button_Update... and so on.
Eureka!!
That gradient blue background.... in my EditCommandColumn buttons too...
Subscribe to:
Post Comments (Atom)
Cookies, anyone?
Our application started having integration issues early March this year. Did I say that was intermittent? To add to our confusion, we coul...
-
Disclaimer: This post has nothing to do with washing or repairing cars. Well, I have been pondering over Managers and Management for lo...
-
I am a Hindu. But I did not know what it exactly meant till recently. More of the awareness came from the Satsangs (spiritual group discussi...
-
As I noted in my earlier blog post , I started the journey on Salesforce this January (2020!). Little did I know how much I would learn, an...
No comments:
Post a Comment