开发者

Cloning usercontrol using Jquery

开发者 https://www.devze.com 2023-03-18 01:09 出处:网络
Page contains four grid with same no 开发者_如何学运维of columns.so, i have created a usercontrol which i am dragging four times on my page so it has created. uc1:grid1,uc1:grid2,uc1:grid3,uc1:grid4.

Page contains four grid with same no 开发者_如何学运维of columns.so, i have created a usercontrol which i am dragging four times on my page so it has created. uc1:grid1,uc1:grid2,uc1:grid3,uc1:grid4.

This means after rendering it will fetch four grids from the server. So If i create a grid & using Jquery .clone() i.e $(grid).clone() If i create 3 clones I can reduce server overhead. Is there any problem using this method?


If after cloning you need other data manipulation like changing headers and CSS and stuff like that, then sticking to your server code is more reasonable. But if you have 4 identical grids, int both structure and data, and they all have the same styles, then choose clone() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号