Right align column data for the following structure

Right align column data for the following structure

_jthomas_jthomas Posts: 75Questions: 0Answers: 0
edited June 2011 in General
Hi ,
Where shall I give the right alignment style for a td for the following structure. When I try to apply "sClass" style through "aoColumns" nothing gets rendered. Please advise and thanks very much.


[code]




$(document).ready(function() {

var oTable = $('#customer').dataTable( {
"bProcessing": true,
"sAjaxSource": "file:///C:/CutomerList.txt",
"bDeferRender": true,
"bAutoWidth": false,
"aaSorting": [],
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100], [25, 50, 100]],
"sPaginationType": "full_numbers",
"oLanguage": {
"sSearch": "Search all columns:"
}

} );


oTable.fnFilterOnReturn();

} );









Customer #
Customer Name
Phone Number
Avg Volume($ amount)
GPO Contract Name/#







 
 
 
 
 











[/code]

Replies

  • _jthomas_jthomas Posts: 75Questions: 0Answers: 0
    I have removed the table definition inside the " and went with the following and is now working

    [code]
    $(document).ready(function() {
    $('#dynamic').html( '' );
    var oTable = $('#customer').dataTable( {
    "bProcessing": true,
    "sAjaxSource": "file:///C:/CutomerList.txt",
    "bDeferRender": true,
    "bAutoWidth": false,
    "aaSorting": [],
    "iDisplayLength": 25,
    "aLengthMenu": [[25, 50, 100], [25, 50, 100]],
    "sPaginationType": "full_numbers",
    "oLanguage": {
    "sSearch": "Search all columns:"
    },
    "aoColumns": [
    { "sTitle": "Customer #", "sClass": "right", "sWidth": "200px" },
    { "sTitle": "Customer Name", "sClass": "left", "sWidth": "1600px" },
    { "sTitle": "Phone Number" , "sClass": "left", "sWidth": "600px" },
    { "sTitle": "Avg Volume($ amount)", "sClass": "right", "sWidth": "600px" },
    { "sTitle": "GPO Contract Name/#", "sClass": "left", "sWidth": "600px" }
    ]

    } );


    oTable.fnFilterOnReturn();

    } );
    [/code]
This discussion has been closed.