ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: parthcool07 on September 26, 2013, 11:27:35 am
-
Hello,
I am trying to set hscroll and vscroll height and width programatically on grid resize.
But I can not set length of hscroll and vscroll.
looking for your reply.
-
How are you doing it. Would you mind sharing your code.
-
Yes sure, on resize event of pqGrid fn._refreshResizable , i am trying to set length of scroll bar as below code.
var tblID = $(this).attr('id');
$("#"+tblID).find(".pq-hscroll").css("width",that.element.width());
The Problem is when i have created a grid at that time scroll bar is working fine, but now if i am doing resize then it will not change length of scrollbar (horizontal and vertical) depending on width and height of grid. So I am trying to reassign height and width to vertical and horizontal scroll bar. But it is taking original length value at the time of grid created.
-
The problem you have mentioned should go away if you use refresh after grid resize.
Anyhow if you still need to set length of scrollbar
use length http://paramquery.com/api/scrollbar#option-length (http://paramquery.com/api/scrollbar#option-length)
to set the length of scrollbar instead of css
-
hello,
I have try to set as you say, but it is not updating length of horizontal and vertical scrollbar on grid resize event.
that.options.height = that.element.height();
that.options.width = that.element.width();
that.$hscroll.pqScrollBar({
direction: "horizontal",
pace:that.options.scrollModel.pace,
cur_pos: 0,
length:that.options.width}).pqScrollBar('refresh');
Can you please help me to solve this problem.
On resize grid view is not taking scrollbar length automatically.
-
I believe you don't need to change it's length as it's taken care of grid by itself.
Just follow this example.
http://paramquery.com/demos/resizable_popup (http://paramquery.com/demos/resizable_popup)
and please let know if you face any problem with it.