Hi,
I am using infragistics 7.1 on .Net2.0 with c#. I am looking for a way to manipulate fonts for each column of my ultrawebgrid. Also I want to have different centering/justification for each column.
I need to push my code to production soon. Please reply ASAP.
Thanks,
I've tried to set the SelectedCellStyle in both the designer and code-behind but neither worked. Here is my code to change the padding.
GridName.Bands(0).Columns.FromKey("ContractDescription").SelectedCellStyle.Padding.Top = 0
Can you give me an example of how to change the properties of a cell that is selected?
Thanks,Rob
Ivan's suggestion is a client-side solution. You can also set a column's CellStype and SelectedCellStyle properties in the designer or the code-behind.
Hello,
Please find the JavaScript code below. You can use the property cssText of cells to set some style or manipulate it.
<ClientSideEvents CellClickHandler="CellManipulation" />
<script type="text/javascript">
function CellManipulation (gridId, cellId){
var rowLength = igtbl_getGridById(gridId).Rows.length;
var collId = igtbl_getCellById(cellId).Index;
var collIdy = igtbl_getCellById(cellId);
for(var i = 0; i<rowLength; i++){
igtbl_getCellById('UltraWebGrid1_rc_' + i + '_' + collId).Element.style.cssText="font-size-adjust: 0.3; text-align: center;";
}
</script>
I hope this helps.