ParamQuery Grid
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
How can I show the same grid multiple times on html page?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How can I show the same grid multiple times on html page? (Read 3516 times)
stoodin
Pro Enterprise
Jr. Member
Posts: 85
How can I show the same grid multiple times on html page?
«
on:
May 19, 2014, 07:19:24 pm »
Hi Paramvir,
I have a grid on one page that depends on condition I have to repeat a few times.
Is there any easy way to show a grid with same name multiple times without copying the js file and rename the grid?
Thanks a lot,
Logged
paramvir
Administrator
Hero Member
Posts: 6313
Re: How can I show the same grid multiple times on html page?
«
Reply #1 on:
May 19, 2014, 08:18:27 pm »
Do you mean by HTML name attribute or variable name of the grid instance i.e., $grid ?
you could deep clone the initialization object i.e., the object passed to pqGrid constructor and create as many grid instances as required with it.
Logged
stoodin
Pro Enterprise
Jr. Member
Posts: 85
Re: How can I show the same grid multiple times on html page?
«
Reply #2 on:
May 19, 2014, 09:01:26 pm »
Oh Great Idea,
I just need to show the same grid multiple times on the same html page with more efficient way as possible.
There is some data repetition and depends on situation we ask user to enter the same data multiple times.
Any chance you can give me a small example of deep clone of grid init object and how do I use it on the page?
Thanks a lot
Logged
paramvir
Administrator
Hero Member
Posts: 6313
Re: How can I show the same grid multiple times on html page?
«
Reply #3 on:
May 19, 2014, 11:29:24 pm »
Please see the line 58 in this demo
http://paramquery.com/pro/demos/nesting
Code:
[Select]
var objCopy = $.extend(true, {}, gridDetailModel);
which deep clones the constructor object of the detail grid instances. $.extend is part of jQuery API
Logged
stoodin
Pro Enterprise
Jr. Member
Posts: 85
Re: How can I show the same grid multiple times on html page?
«
Reply #4 on:
May 20, 2014, 12:37:39 am »
Great,
Thanks a lot. I did it and it works.
Logged
Print
Pages: [
1
]
« previous
next »
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
How can I show the same grid multiple times on html page?