how to adjust gridview width manually by the user

Nssxkmrovp

New Member
I have a asp.net gridview i want user should be able to adjust column width.for this i have return code as\[code\]<script type="text/javascript" src="http://stackoverflow.com/questions/12750815/scripts/jquery-latest.js"/><script src="http://stackoverflow.com/Scripts/colResizable-1.3.min.js" type="text/javascript"/><script src="http://stackoverflow.com/Scripts/jquery.cookie.js" type="text/javascript"/>function beforeAsyncPostBack() { //Placeholder } function afterAsyncPostBack() { if ($.cookie('colWidth') != null) { var columns = $.cookie('colWidth').split(','); var i = 0; $('#<%=gvTest1.ClientID%> th').each(function () { $(this).width(Number(columns)); i = i + 1; }); } $("#<%=gvTest1.ClientID%>").colResizable({ disable: true, }); $("#<%=gvTest1.ClientID%>").colResizable({ liveDrag: true, gripInnerHtml: "<div class='grip'></div>", draggingClass: "dragging", onResize: onSampleResized }); } Sys.Application.add_init(appl_init); function appl_init() { var pgRegMgr = Sys.WebForms.PageRequestManager.getInstance(); pgRegMgr.add_beginRequest(BeginHandler); pgRegMgr.add_endRequest(EndHandler); } function BeginHandler() { beforeAsyncPostBack(); } function EndHandler() { afterAsyncPostBack(); }\[/code\]But this code is not working for me, only at load once it is working but when i click on edit and update the code does'nt work.I have gridview inside the update panel.
 
Back
Top