Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

gridview column resizing ...

$
0
0

Hi

masters

I am using Jquery for resizing gridview column..but unable to do it.

plz see code and suggest what is problem..

here is full code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="loginrpt.aspx.cs" Inherits="loginrpt" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head></head><meta http-equiv="Content-Language" content="en-us" /><meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /><title></title><link href="../inc/main.css" rel="stylesheet" type="text/css" /><script src="../inc/jquery.js" type="text/javascript"></script><script src="../inc/colResizable-1.3.min.js" type="text/javascript"></script><script type="text/javascript" language="javascript"></script><script type="text/javascript">

            function doPrint()
             {
            var prtContent = document.getElementById('<%= GridView1.ClientID %>');
            prtContent.border = 4;
            var WinPrint = window.open('', '', 'left=100,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable=1');
            WinPrint.document.write(prtContent.outerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            WinPrint.close();
            }</script><script type="text/javascript">
      $(function () {
             $('#<%=GridView1.ClientID %>').colResizable({
                liveDrag: true,
                gripInnerHtml: "<div class='grip'></div>",
                draggingClass: "dragging",
            });
        });</script><style type="text/css">
        .style1
        {
            font-weight: bold;
        }</style><body topmargin="0"><form id=f1  runat="server"><div align="center"><table border="0" cellpadding="0" style="border-collapse: collapse" width="100%"><tr><td height="38" class="style1" align="left"><font size="4" color="#5ED548"  ></font></td></tr><tr><td><div align="left"><table border="1" cellpadding="0" style="border-collapse: collapse" width="537" bgcolor="#CCFFCC" height="37"><tr><td><div align="center"><table border="0" cellpadding="0" style="border-collapse: collapse" width="100%"><tr><td width="102">&nbsp;Select Option</td><td><asp:DropDownList ID="DropDownList1" runat="server" Height="16px" Width="228px" AutoPostBack="true"><asp:ListItem Text="---Please Select---" Value="0" /><asp:ListItem Text="Not logged n For Last 5 Days" Value="1" /><asp:ListItem Text="Not logged In For Last 10 Days" Value="2" /></asp:DropDownList></td><td width="30"><asp:Button ID="Button1" runat="server" Text="GO" Width="52px" OnClick="Button1_Click" /></td><td width="30"><asp:Button ID="Button2" runat="server" Text="Print" OnClientClick=" doPrint()"
                        Width="39px" /></td></tr></table></div></td></tr></table></div></td></tr><tr><td>&nbsp;</td></tr><tr><td style="border-style: solid; border-width: 1px; margin-left: 10; margin-right: 10"><div align= "left" style=" height: 500px; overflow:scroll" ><asp:GridView ID="GridView1" runat="server" BorderStyle="None"
                            BorderWidth="1px" CellPadding="4" AutoGenerateColumns="False"
                            style="font-family: Arial; font-size: small" ><Columns><asp:BoundField DataField="user_name" HeaderText="UserName" SortExpression="user_name"  ItemStyle-Height="5px"  ItemStyle-Width="10px" HeaderStyle-Height="10px" HeaderStyle-Width="10px"   ><ItemStyle CssClass="center"/><HeaderStyle Height="10px" Width="10px" ></HeaderStyle><ItemStyle Height="5px" Width="5px"></ItemStyle></asp:BoundField><asp:BoundField DataField="user_designation" HeaderText="Designation" SortExpression="user_designation"  ItemStyle-Height="5px" ItemStyle-Width="10px" HeaderStyle-Height="10px" HeaderStyle-Width="10px" ><ItemStyle CssClass="center" /><HeaderStyle Height="10px" Width="10px"></HeaderStyle><ItemStyle Height="5px" Width="10px"></ItemStyle></asp:BoundField><asp:BoundField DataField="office_name" HeaderText="OfficeName" SortExpression="office_name"   ItemStyle-Height="10px" ItemStyle-Width="5px" HeaderStyle-Height="10px" HeaderStyle-Width="10px"   ><ItemStyle CssClass="center" /><HeaderStyle Height="10px" Width="10px"></HeaderStyle><ItemStyle Height="10px" Width="5px"></ItemStyle></asp:BoundField><asp:BoundField DataField="Ledit" HeaderText="Logintime" SortExpression="Ledit"  ItemStyle-Height="10px"  ItemStyle-Width="10px" HeaderStyle-Height="5px" HeaderStyle-Width="10px" ><ItemStyle CssClass="center"/><HeaderStyle Height="5px" Width="5px"></HeaderStyle><ItemStyle Height="10px" Width="10px"></ItemStyle></asp:BoundField></Columns><RowStyle height="2px" Wrap="False"  /></asp:GridView></div></td></tr><tr><td>&nbsp;</td></tr></table></div></form></body></html>



Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>