JavaScript How do I fix long column value issue which breaks table outside of container, using DataTables.net? for long columns the value of buckling load is,column_value

When one column has a long value, without spaces, the table breaks out of any container with a set width (or percentage). Currently, I'm needing a table with 50% width, and the long value breaks the table out of the 50% width container.

This jsFiddle simplifies my issue, with a width of 70%, and any custom CSS I've used overriding typical DataTables.net CSS (besides visual styling).

http://jsfiddle.net/mswieboda/8qVh4/

HTML:

<div class="container">
  <table class="grid"></table>
</div>

CSS:

.dataTable {
  width: 100% !important;
  margin: 0;
}
.dataTables_wrapper {
  position: relative;
}
.dataTables_scrollHeadInner {
  width: 100% !important;
}
.container {
  position: relative;
  width: 70%;
  border: 1px solid #f0f;
}
.container .grid {
  position: relative;
  overflow-x: hidden;
}

Note: I realize I shouldn't use !important, but that's an issue for another day.

Please see the jsFiddle for the specific JS, and DataTables.net options I'm using.

I'd like to cut off/truncate the long value with ellipses using CSS. I probably need something like:

.dataTable tbody td {
  text-overflow: ellipsis;
  overflow: hidden;
}

The only solution that's worked for me is to have a div in the td and setting a max-width/width on the div, but I don't want to set a fixed width, since I want it to be figured out from DataTables.net options, using the sWidth option.

I've done some research, but haven't come up with any solid solutions yet. Does anyone have a solution for this?

Answer:1

I have a property grid with multiple comboboxes and I want to filter the values in one box based on what is selected in the previous box. My code looks like this: var tempPropGrid = me.getView().add(...

I have a property grid with multiple comboboxes and I want to filter the values in one box based on what is selected in the previous box. My code looks like this: var tempPropGrid = me.getView().add(...

  1. extjs filter combobox
  2. extjs filter combobox store
  3. extjs combobox filter as you type
  4. extjs combobox filter store example
  5. extjs combobox filter anymatch
  6. extjs combobox filter not working
  7. extjs combobox filter example
  8. extjs grid filter combobox
  9. extjs 3.4 combobox filter store
  10. extjs 6 combobox filter
  11. extjs 4 grid filter combobox
  12. extjs combobox filter event

My angular is 1.0.8-stable My objective is to display data in rows of 3. My html should look like <div class="table-row"> <div class="item">item1</div> <div class="item"...

My angular is 1.0.8-stable My objective is to display data in rows of 3. My html should look like <div class="table-row"> <div class="item">item1</div> <div class="item"...

I just came across the following line of code in one of the Windows Store Apps samples. if (that.assets[asset].object === null || !!!that.assets[asset].object.canPlayType) { It uses a triple ...

I just came across the following line of code in one of the Windows Store Apps samples. if (that.assets[asset].object === null || !!!that.assets[asset].object.canPlayType) { It uses a triple ...

  1. what does ���� mean
  2. what does smh mean
  3. what does boomer mean
  4. what does ok boomer mean
  5. what does the fox say
  6. what does simp mean
  7. what does sos mean
  8. what does dna stand for
  9. what does noel mean
  10. what does asl mean
  11. what does ig mean
  12. what does gap stand for
  13. what does otp mean
  14. what does uwu mean
  15. what does mean
  16. what does goat mean
  17. what does bomboclaat mean
  18. what does pansexual mean
  19. what does woke mean
  20. what does ion mean

I'm sending an ajax request with relative url $.post("wp-content/themes/site/function.php", { }, function (data) {}); It's working fine if my url is http://yourdomain.com/page. But if the url ...

I'm sending an ajax request with relative url $.post("wp-content/themes/site/function.php", { }, function (data) {}); It's working fine if my url is http://yourdomain.com/page. But if the url ...

  1. relative frequency
  2. relative dating
  3. relative pronouns
  4. relative humidity
  5. relatively
  6. relative clause
  7. relative location
  8. relative insanity
  9. relative definition
  10. relative finder
  11. relative risk
  12. relative age
  13. relative deprivation
  14. relative dating definition
  15. relative frequency distribution
  16. relative motion
  17. relatively prime
  18. relative maximum
  19. relative frequency table
  20. relative frequency histogram