Is there a way that the column width of jqgrid change dynamically according to the content of that column? I used shrinkToFit and autoWidth but non of them worked for me. I use jqgrid 4.5.2. I have searched and read the other questions but those didn't work for me. Maybe there is a widget to do that. I will be thankful if you help me.
相关问题
- How to bind a dropdown list inside jqgrid row cell
- jQgrid filterToolbar fails with searchOnEnter
- Detecting checkbox event in jqGrid cell
- How to alter data received from the server before
- How to access other row data from a cell's cus
相关文章
- jqGrid Row Object in onSelectRow
- Weird behavior of jqgrid Grouping
- jQuery - jqGrid - submit buttons in each row
- JqGrid: sorting of local data
- How to Expand/Shrink row in Jqgrid dynamically
- VB.net FileUpload using Ajaxcall
- jqGrid addRowData doesn't work with grid as su
- How to turn off column highlighting (on hover) for
This is a good solution, but the column widths jump to the initial width when re-sizing. This is my modified solution as a separate function. Designed to work with shrinkToFit set to false, and fire just once:
Here's how I implement jqGrid column width based on column content. Add this to the gridComplete event.
A working example:
http://jsfiddle.net/Ba5yK/17/
Hope this helps,
Paul
I am not sure this answered earlier or not but below is solution I implemented which is working one. Just provide column width in percentage and summation of all column should reach to 100%. But I am not sure how to deal with adding/removing columns at runtime.
I am working on that as well and will update all.
Thanks Rushi
pphillips001 answer works for me but resizing is to slow when the grid grows. I just updated the logic and the performance is very good now.
}
colModel: [ { name: "f_name",index:"f_name",width:'100%'} ]