Jump to content

Search the Community

Showing results for tags 'gridview'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. how to read xml nodes with same name in c#? I have XML file with a users, and their personal informations(name, surname, age, photos...). I'm displaying this infos in gridview, and everything is ok. Just cannot select one photo to display in the gridview, one photo for every user, like profile photo. I cannot do this cause there is not a tag . There are more tags with same name like in example below. So i'm trying to select all infos, put in datatable, and display in gridview control with Eval("Foto") functioon. But photos cannot be displayd because in evel function cannot be inserted more photos in same time. This is the structure of the photos in the XML document: <User><Name>User name</Name><Surname>User surname</Surname><Foto>http://website.com/images/image1.jpg</Foto><Foto>http://website.com/images/image2.jpg</Foto><Foto>http://website.com/images/image3.jpg</Foto><Foto>http://website.com/images/image4.jpg</Foto></User> This is the gridview control which i use <asp:GridView ID="GridView1" ShowFooter="false" ShowHeader="false" CssClass="tablepress-id-N" runat="server" AutoGenerateColumns="false" AllowPaging="true" OnPageIndexChanging="OnPageIndexChanging" onrowdatabound="GridView1_RowDataBound"><Columns><asp:TemplateField><ItemTemplate><li class="objectListItem"><div style="float:left;width:12%;margin-right:5%;"><asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Foto")%>'></asp:Image></div></ItemTemplate></asp:TemplateField></Columns><pagerstyle cssclass="gridviewPager"></pagerstyle></asp:GridView> Where i make a mistake?
  2. asp page design view is not showing gridview on design page. I am working on a asp project. one of the asp page is not showing it's design view completely but it showing it's source view and code is running fine.actually gridview is not showing in design view. please help me to fix it. following is my code please go through it <%@ Page Language="VB" AutoEventWireup="false" CodeFile="inassembly.aspx.vb" Inherits="inassembly" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <link rel="shortcut icon" type="image/x-icon" href="Images/favicon.ico" /> <link id="Link1" runat="server" rel="icon" href="Images/favicon.ico" type="image/ico" /> <script type="text/javascript"> function openwindow() { window.showModalDialog('popup.aspx', '', 'width=500,height=500,status=0,toolbar=0,menubar=no') } </script> <style type="text/css"> .CSSTableGenerator { margin:0px;padding:0px; width:100%; box-shadow: 10px 10px 5px #888888; border:1px solid #000000; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px; -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px; -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px;}.CSSTableGenerator table{ width:100%; height:100%; margin:0px;padding:0px;}.CSSTableGenerator tr:last-child td:last-child { -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px;}.CSSTableGenerator table tr:first-child td:first-child { -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px;}.CSSTableGenerator table tr:first-child td:last-child { -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px;}.CSSTableGenerator tr:last-child td:first-child{ -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px;}.CSSTableGenerator tr:hover td{ }.CSSTableGenerator tr:nth-child(odd){ background-color:#aad4ff; }.CSSTableGenerator tr:nth-child(even){ background-color:#ffffff; }.CSSTableGenerator td{ vertical-align:middle; border:1px solid #000000; border-width:0px 1px 1px 0px; text-align:left; padding:7px; font-size:10px; font-family:Arial; font-weight:normal; }.CSSTableGenerator tr:last-child td{ border-width:0px 1px 0px 0px;}.CSSTableGenerator tr td:last-child{ border-width:0px 0px 1px 0px;}.CSSTableGenerator tr:last-child td:last-child{ border-width:0px 0px 0px 0px;}.CSSTableGenerator tr:first-child td{ background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) ); background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f); background-color:#005fbf; border:0px solid #000000; text-align:center; border-width:0px 0px 1px 1px; font-size:14px; font-family:Arial; font-weight:bold; color:#ffffff;}.CSSTableGenerator tr:first-child:hover td{ background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) ); background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f); background-color:#005fbf;}.cssnew{ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f);} .CSSTableGenerator tr:first-child td:first-child{ border-width:0px 0px 1px 0px;}.CSSTableGenerator tr:first-child td:last-child{ border-width:0px 0px 1px 1px;}</style> <style type="text/css" >.body1 {background-repeat: no-repeat;width:100%; }</style><style type="text/css" >.blurring {opacity:0.4;filter:alpha(opacity=40); }</style><title> Assembly Dash Board</title> </head> <body id="blurbody" runat="server" style="height: 201px; background-image:url('Images/bluelast.jpeg') ; overflow:hidden " > <form id="form1" runat="server"> <div class="body1" id="dvmain1" runat="server"> <table> <tr> <td width="120" height="30" valign="top"> <img src="Images/imapglogo3.bmp" alt="" /> </td> <td align="center" valign="top" width="70%" > <%--<img src="Images/titleimg.bmp" alt="" />--%> <asp:Label ID="label4" runat ="server" Text ="Assembly Dash Board" ForeColor="DarkRed" Font-Size="Larger" Font-Names="arial" Font-Bold="true" ></asp:Label> </td> <td align="center" style="width:100px; width:"20%"> <asp:ImageButton ID="button2" runat="server" ImageUrl="Images/backred2.gif" /> <%--<asp:Button ID="button2" runat="server" Text="Back" BackColor="BurlyWood" />--%> </td> <td align="left" style="width:100px;"> <%--<asp:Button ID ="button3" runat="server" Text="Layouts" BackColor="BurlyWood" BorderStyle="Outset" />--%> <asp:ImageButton ID="button3" ToolTip="click to view Layouts" runat="server" ImageUrl="Images/images24revised.JPG" /> </td> </tr> </table> <table> <tr > <td align="left" nowrap="nowrap"> <asp:Label ForeColor="White" Font-Size="small" ID ="label5" runat ="server" Text ="Cost Center :" Font-Bold="true" ></asp:Label> </td> <td align="left" nowrap="nowrap" colspan="5" style="width:300px;" > <asp:Label ForeColor="White" Font-Size="small" ID="label6" runat ="server" align="left" Text ="text"></asp:Label> </td> <td align="center" style="width:200px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="left" style="width:200px;" > <asp:label Font-Size="small" ForeColor="white" ID="label11" runat="server" Font-Bold ="true" Text="Pending(%)"></asp:label> </td> <td align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label16" runat ="server" Font-Bold ="true" Text="Total Number"></asp:Label> </td> <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label1" runat ="server" Font-Bold ="true" Text="Completed"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> </tr><tr > <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label14" runat ="server" Font-Bold ="true" Text="Location :"></asp:Label> </td> <td colspan="5" align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label10" runat="server" Text="text"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label7" runat ="server" Text ="Assemblies" Font-Bold="true" ></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label12" runat="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label17" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label2" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td></tr><tr> <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label19" runat ="server" Font-Bold ="true" Text="Engineer :"></asp:Label> </td> <td colspan="4" align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label15" runat="server" Text="text"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor ="white" ID="label8" runat="server" Text="Items" Font-Bold ="true" ></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label13" runat="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label18" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label3" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td></tr><tr> <td align="left" nowrap="nowrap"> <asp:Label Font-Size="small" ForeColor="white" id="label21" runat ="server" Font-Bold ="true" Text="Delivery Date :"></asp:Label> </td> <td nowrap="nowrap" colspan="2" align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label20" runat ="server" Text="text"></asp:Label> </td> <td align="center" style="width:200px;"> </td> <td align="left" style="width:100px;"> </td> <%--value of completed--%> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> </tr><%--<tr> <td align="left" style="width:100px;"> <asp:Label ForeColor="#8C001A" id="label22" runat ="server" Text=""></asp:Label> </td> <td align="center" style="width:200px;"> </td> <td align="left" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> </tr>--%> </table> </div> <table width="100%"> <tr><td><div class="CSSTableGenerator" style="float: left; width:100%; "> <table id="Table1" runat="server" cellpadding="1" border="1" style="background-color: #FFFFFF; border-color: #999999; border-style: none; border-width: 1px; width: 100%; "> <tr> <td align="center" style="width:08%;"> <font color="#dddddd" size="01px" > Assembly </font> </td> <td align="center" style="width:14%;" > <font color="#dddddd" size="01px"> AssemblyName </font> </td> <td align="center" style="width:07%;"> <font color="#dddddd" size="01px"> Source </font> </td> <td align="center" style="width:14%;"> <font color="#dddddd" size="01px"> Operator </font> </td> <td style="width:04%;" > <font color="#dddddd" size="01px"> Hours </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Start Date </font> </td> <td style="width:04%;"> <font color="#dddddd" size="01px"> End Date </font> </td> <td align="center" style="width:22%;"> <font color="#dddddd" size="01px"> Operators </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Hours </font> </td> <td style="width:03%;" > <font color="#dddddd" size="01px"> Start Date </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> End Date </font> </td> <td style="width:03%;" > <font color="#dddddd" size="01px"> Shortfall </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Rack </font> </td> <td align="center" style="width:07%;"> <font color="#dddddd" size="01px"> Remark </font> </td> </tr> </table> </div></td></tr> <tr><td > <div class="CSSTableGenerator"id="div1"style="height:460px; overflow:scroll " > <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="both" > <AlternatingRowStyle BackColor="#aad4ff" /> <Columns> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="Small" > <ItemTemplate > <asp:label ID="label23" Font-Size="small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbCd") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="center" /> </asp:TemplateField> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="small" > <ItemTemplate> <asp:label ID="label24" Font-Size="Small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbNm") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign="Left" /> </asp:TemplateField> <asp:BoundField HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="operators" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="Days" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right"/> </asp:BoundField> <asp:BoundField DataField="PlannedDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0: dd- MMM- yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="PlancedEnddt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0: dd- MMM- yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Operator" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField DataField="ActualDays" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualStartDt" HeaderText=" " ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualEndDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="IssuePending" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="rack" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Remark" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Center" /> </asp:BoundField> </Columns> </asp:GridView> </div> </td> </tr> </table> </form> </body></html> please fix it.
  3. I have developed gridview in asp.net. gridview is showing in Internet Explorer (IE) but not in mozilla firefox,chrome. please sort out my problem Following is my gridview code <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Both"> <AlternatingRowStyle BackColor="#DCDCDC"/> <Columns> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="Small" > <ItemTemplate > <asp:label ID="label23" Font-Size="small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbCd") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="center" /> </asp:TemplateField> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="small" > <ItemTemplate> <asp:label ID="label24" Font-Size="Small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbNm") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign="Left" /> </asp:TemplateField> <asp:BoundField HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="operators" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="Days" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right"/> </asp:BoundField> <asp:BoundField DataField="PlannedDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="PlancedEnddt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Operator" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField DataField="ActualDays" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualStartDt" HeaderText=" " ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualEndDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="IssuePending" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="rack" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Remark" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Center" /> </asp:BoundField> </Columns> </asp:GridView>
  4. I am doing a asp project. In that i have fixed header of grid view. it looks perfect in internet explorer but when i open that page in mozilla or google chrome alignment of fixed gridview header and gridview changes. also in firefox datagrid cell's text color spreads over border it's not happening with chrome or IE but firefox doing this. please tell me how do i achieve browser compatibility in this case. Thanks, Rhishikesh Chogale following is the way i have done header fixing of gridview <table id="Table1" runat="server" cellpadding="1" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; width: 100%;"> <tr style="background-color:#000000 "> <td align="center" style="width:08%;"> <font color="#dddddd"> Assembly </font> </td> <td align="center" style="width:13%;" > <font color="#dddddd"> AssemblyName </font> </td> <td align="center" style="width:08%;"> <font color="#dddddd"> Source </font> </td> <td align="center" style="width:13%;"> <font color="#dddddd"> Operators </font> </td> <td style="width:04%;" > <font color="#dddddd"> Hours </font> </td> <td style="width:04%;"> <font color="#dddddd"> Start Date </font> </td> <td style="width:04%;"> <font color="#dddddd"> End Date </font> </td> <td align="center" style="width:17%;"> <font color="#dddddd"> Operators </font> </td> <td style="width:04%;"> <font color="#dddddd"> Hours </font> </td> <td style="width:04%;" > <font color="#dddddd"> Start Date </font> </td> <td style="width:04%;"> <font color="#dddddd"> End Date </font> </td> <td style="width:04%;" > <font color="#dddddd"> Shortfall </font> </td> <td style="width:03%;"> <font color="#dddddd"> Rack </font> </td> <td align="center" style="width:10%;"> <font color="#dddddd"> Remark </font> </td> </tr> </table> And following is the way i have fixed size of gridview by vb.net Protected Sub GridView2_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView2.RowDataBound If e.Row.RowType = DataControlRowType.Header Then Dim cell As TableCell = e.Row.Cells(0) cell.Width = New Unit("08%") Dim cell1 As TableCell = e.Row.Cells(1) cell1.Width = New Unit("13%") Dim cell2 As TableCell = e.Row.Cells(2) cell2.Width = New Unit("08%") Dim cell3 As TableCell = e.Row.Cells(3) cell3.Width = New Unit("13%") Dim cell4 As TableCell = e.Row.Cells(4) cell4.Width = New Unit("04%") Dim cell5 As TableCell = e.Row.Cells(5) cell5.Width = New Unit("04%") Dim cell6 As TableCell = e.Row.Cells(6) cell6.Width = New Unit("04%") Dim cell7 As TableCell = e.Row.Cells(7) cell7.Width = New Unit("17%") Dim cell8 As TableCell = e.Row.Cells(8) cell8.Width = New Unit("04%") Dim cell9 As TableCell = e.Row.Cells(9) cell9.Width = New Unit("04%") Dim cell10 As TableCell = e.Row.Cells(10) cell10.Width = New Unit("04%") Dim cell11 As TableCell = e.Row.Cells(11) cell11.Width = New Unit("05%") Dim cell12 As TableCell = e.Row.Cells(12) cell12.Width = New Unit("04%") Dim cell13 As TableCell = e.Row.Cells(13) cell13.Width = New Unit("11%") End If End Sub
  5. Hi, I am creating a validation for gridview row Selection. There is a "Delete" button and a GridView, in that GridView, there is a "Select" LinkButton column. I am trying to create a validation for that, When clicking on the "Delete" Button, If the particular row in GridViewis not selected for deleting, then it should show a alert message i.e. "First select any row to delete." So I wrote a code for the validation: <script type="text/javascript"> function validateGridSelection() { var GridSelectedID = document.getElementById('<%=GridView1.ClientID%>'); if (GridSelectedID.rows.selectedIndex = -1) { alert("First select any row to delete"); return false; } } </script> But this JavaScript is not working for this validation. So, Please help me out to sort out this problem. Thanks.
×
×
  • Create New...