开发者

Applying CssStyle to Infragistics WebDataGrid column, when loading dynamically

开发者 https://www.devze.com 2023-04-07 07:51 出处:网络
I\'m trying to right-align a column in my WDG. I\'ve been through the Infragistics tutorials, so I know that I need to added a new CSS style as such...

I'm trying to right-align a column in my WDG. I've been through the Infragistics tutorials, so I know that I need to added a new CSS style as such...

tbody > tr > td.ColumnRight
{
    text-align: right;
}

Then on my column apply CssStyle="ColumnRight"

However, my WDG is on a usercontrol which is dynamically loaded.

When the page comes up the right-align has not taken hold.

It does not work until you refresh the page (F5) 开发者_如何学Go- but this is undesirable, really need the style in place upon first-load.

Its obviously a problem with the dynamic loading, but any ideas how to fix it?

Any help much appreciated!


For looking into this, I would look at the css that is applied to the cells by using an element inspector like provided by the developer tools for IE or fire bug on Firefox. This should help you to know if your css is being loaded and something else is taking precedence.

Also, when you dynamically load the UserControl is it on a full post back or an AJAX call back such as inside of an update panel? If in an AJAX call and you change the call to be a full post back, does it change the behavior?

Is the behavior consistent across multiple web browsers or does it only occur in one browser?

For more specific suggestions, I would need more details on how you are dynamically loading the UserControl and where the CSS is. Is it in another file, a style on the page/user control?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号