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,
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.
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.