How to ensure the Column width fixed
How to ensure the Column width fixed
Hello everyone,
I am having problem in data Tables column width. I want ensure the Column width fixed.What i mean is the column width should not change depends on string length in Data Tables column .
[quote]
For Example:-
email column
XX@gmail.com
ABCDEFGHIJKLMNOP123456789ZXCVBNM@gmail.com
The should be in same column.First one is short and second one is long .it Should not change the Column Width.If the string length is high means,it string should truncate and move to new line
like
ABCDEFGHIJKLMNOP12345678
9ZXCVBNM@gmail.com
[/quote]
This is what i'm looking for.
My Data Table Config:-
=============
[code]
var oTable = $('#user_table').dataTable( {
"aoColumns": [
{ "sClass": "number", "bSortable": false },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit" , "bSortable": false}
],
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "ajax_user_table"
});
[/code]
My Html Markup
============
[code]
#
First Name
Last Name
User Name
E-mail
Total Bidz Purchased
Total Free Bidz
Total Bidz Available
Total Bidz Used
View
E
D
S
Loading data from server
#
First Name
Last Name
User Name
E-mail
Total Bidz Purchased
Total Free Bidz
Total Bidz Available
Total Bidz Used
View
E
D
S
[/code]
Live problem Snapshot here http://www.diigo.com/item/image/19c1l/3cvt
Help me .Thanks in advance
I am having problem in data Tables column width. I want ensure the Column width fixed.What i mean is the column width should not change depends on string length in Data Tables column .
[quote]
For Example:-
email column
XX@gmail.com
ABCDEFGHIJKLMNOP123456789ZXCVBNM@gmail.com
The should be in same column.First one is short and second one is long .it Should not change the Column Width.If the string length is high means,it string should truncate and move to new line
like
ABCDEFGHIJKLMNOP12345678
9ZXCVBNM@gmail.com
[/quote]
This is what i'm looking for.
My Data Table Config:-
=============
[code]
var oTable = $('#user_table').dataTable( {
"aoColumns": [
{ "sClass": "number", "bSortable": false },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "nonedit" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "price_column" },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit", "bSortable": false },
{ "sClass": "nonedit" , "bSortable": false}
],
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "ajax_user_table"
});
[/code]
My Html Markup
============
[code]
#
First Name
Last Name
User Name
Total Bidz Purchased
Total Free Bidz
Total Bidz Available
Total Bidz Used
View
E
D
S
Loading data from server
#
First Name
Last Name
User Name
Total Bidz Purchased
Total Free Bidz
Total Bidz Available
Total Bidz Used
View
E
D
S
[/code]
Live problem Snapshot here http://www.diigo.com/item/image/19c1l/3cvt
Help me .Thanks in advance
This discussion has been closed.
Replies
also try using some css to ensure line wrapping .. ? (just guessing; this might not work)