Hi,
I'm using multiples webdatagrid in my web app (asp.net) and I have a css class: .td{font-size:14px}. Always I have the webdatagrids in a <td> item then the rows are so the rows are large.
How I could reduce the size of the font size in the rows?
<ig:WebDataGrid ID="UltraWebGridGastosConsorcioReales" runat="server" Width="870px" StyleSetName="Office2007Blue" AutoGenerateColumns="False" DataSourceID="ObjectDataSourceGCReales">
Tks in advance.
Gabriel.
Hi Gabriel,
I guess you would like to increase size of font, because default font of cells in WebDataGrid used by your application is defined by ig_Office2007BlueItem class and it is equal to 10px.
1. You may change font globally for all WebDataGrids on page by overriding igg_Office2007BlueItem. Example:<style type="text/css"> .igg_Office2007BlueItem { font-size:14px; }</style>
2. To change font for cells of individual grid, you have to use ItemCssClass property. Example:<style type="text/css"> .gridItemCss { font-size: 20px; }</style><ig:WebDataGrid ItemCssClass="gridItemCss" ...3. Those classes are applied to TBODY of TD, so they may provide only inherited attributes like font. If you need to change properties of actual TDs, then you should include TD selector. Example:<style type="text/css"> .gridItemCss td { font-size: 15px; border-right: 1px solid red; }</style>
Thank you !!
And.. How could change the style of a row on runtime? ex. if a cell cointains 'false' then the background color be red.
it is possible?
tks in advance !!
Viktor Snezhko tks for your answer I could do it but when a row is selected the background color overlaps the selection.
How I could do to prevent this?
Tks in advance !
The codes, that I gave you before, modified attributes of html elements explicitly. That is not a built-in feature and grid has no knowledge about similar action. It is also not able to show selection, because its functionality is based on css classes and the inline style attributes have priority over attributes in css classes. Therefore selection styles defined by grid-css classes have no effect. Though, if css-attribute has "!important", then css takes over inline style. In general the !important is not recommended for use, though, that is available and an application may take advantage of that feature.
You may add that flag to corresponding classes used by your application globally or locally. Example for global class in ig_res/Default/ig_dataGrid.css
tbody>tr>td.igg_SelectedCell{ background-color: #8DC6EC !important;}
Hi tks I could do it but would like expand the background image I tried to modified the css adding the next:
-webkit-background-size: cover; /*for webKit*/ -moz-background-size: cover; /*Mozilla*/ -o-background-size: cover; /*opera*/
But not works.
Do you know how to expand the background image ?
Hi, someone know the answer?
tks !
Visual effects of various attributes defined in css classes are not related to functionality of WebDataGrid. If browser fails to render expected appearance, then WebDataGrid is not able to fix that. That can be a question for tech support team of a browser.