VB SCRIPT - How to Put Hypherlink in Gridview Field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaredciagar
    New Member
    • Feb 2008
    • 16

    VB SCRIPT - How to Put Hypherlink in Gridview Field

    Hi Guys,
    Can You Help Me PLease...

    I have a 2 gridview the gridview1 and gridview2:
    gridview1-contains Itemcode field(Primary key)
    gridview2-contains have Itemcode field(ForeignKe y)

    gridview1-contains the summary of Items
    gridview2-contains the details of items

    I want to put Hypherlink in the Itemcode Field(Gridview1 ) for the selection of row of an specific item select,so that when I click one of the item in gridview1, the details of that specific item will display its details in gridview2.
  • numena79
    New Member
    • Oct 2007
    • 4

    #2
    Originally posted by jaredciagar
    Hi Guys,
    Can You Help Me PLease...

    I have a 2 gridview the gridview1 and gridview2:
    gridview1-contains Itemcode field(Primary key)
    gridview2-contains have Itemcode field(ForeignKe y)

    gridview1-contains the summary of Items
    gridview2-contains the details of items

    I want to put Hypherlink in the Itemcode Field(Gridview1 ) for the selection of row of an specific item select,so that when I click one of the item in gridview1, the details of that specific item will display its details in gridview2.
    I'm not sure how you're binding your Gridviews behind the scenes, or what your architechture is. Could you post some source code?

    Here's one way in which this could be done (in C#), assuming that your UI relies on the underlying business objects to deliver data ,

    aspx

    <!-- item gridview -->
    <asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False" OnSelectedIndex Changed="GridVi ew1_SelectedInd exChanged" DataKeyNames="P rimaryKeyName">
    <Columns>
    <!-- this is the select hyperlink for each row -->
    <asp:CommandFie ld ShowSelectButto n="True">
    </asp:CommandFiel d>

    </asp:GridView>

    <!-- Details Gridview -->
    <asp:GridView ID="GridView2" runat="server">
    </asp:GridView>




    aspx.cs

    protected void GridView1_Selec tedIndexChanged (object sender, EventArgs e)
    {
    //assuming that itemcode is a unique int
    int itemCode = Convert.ToInt32 (GridView1.Sele ctedDataKey.Val ue.ToString());

    //assuming that the Details of every item might be contained in a different
    // business object which constructs itself based on the item code;
    // you might not be following an n-tiered approach, in which case
    // you could commands to get the data directly
    ItemDetails details = new ItemDetails(ite mCode);

    GridView2.DataS ource = details;
    GridView2.DataB ind();
    }

    Comment

    • jaredciagar
      New Member
      • Feb 2008
      • 16

      #3
      Originally posted by numena79
      I'm not sure how you're binding your Gridviews behind the scenes, or what your architechture is. Could you post some source code?

      Here's one way in which this could be done (in C#), assuming that your UI relies on the underlying business objects to deliver data ,

      aspx

      <!-- item gridview -->
      <asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False" OnSelectedIndex Changed="GridVi ew1_SelectedInd exChanged" DataKeyNames="P rimaryKeyName">
      <Columns>
      <!-- this is the select hyperlink for each row -->
      <asp:CommandFie ld ShowSelectButto n="True">
      </asp:CommandFiel d>

      </asp:GridView>

      <!-- Details Gridview -->
      <asp:GridView ID="GridView2" runat="server">
      </asp:GridView>




      aspx.cs

      protected void GridView1_Selec tedIndexChanged (object sender, EventArgs e)
      {
      //assuming that itemcode is a unique int
      int itemCode = Convert.ToInt32 (GridView1.Sele ctedDataKey.Val ue.ToString());

      //assuming that the Details of every item might be contained in a different
      // business object which constructs itself based on the item code;
      // you might not be following an n-tiered approach, in which case
      // you could commands to get the data directly
      ItemDetails details = new ItemDetails(ite mCode);

      GridView2.DataS ource = details;
      GridView2.DataB ind();
      }



      Can You write it in vb script?please.. .Thank You

      I'm Using ASP.net and MS SQL2005 and I'm using VB SCRIPT

      Here is my code:

      Code: ( vbnet )
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
      Dim con As New SqlConnection

      con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

      Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
      Dim myCommand As New SqlCommand(strS QL, con)
      con.Open()
      GridItemcodeSum m.DataSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
      GridItemcodeSum m.DataBind()

      end sub



      ----------HTML-------------

      <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px">
      <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
      <Columns>
      <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
      <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
      <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
      <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

      </Columns>

      <RowStyle BackColor="#EFF 3FB"></RowStyle>

      <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

      <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

      <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

      <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

      <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
      </asp:GridView>
      I'm Using ASP.net and MS SQL2005 and I'm using VB SCRIPT

      Here is my code:

      Code: ( vbnet )
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
      Dim con As New SqlConnection

      con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

      Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
      Dim myCommand As New SqlCommand(strS QL, con)
      con.Open()
      GridITPSumm.Dat aSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
      GridITPSumm.Dat aBind()

      end sub



      ----------HTML-------------

      <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px">
      <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
      <Columns>
      <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
      <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
      <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
      <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

      </Columns>

      <RowStyle BackColor="#EFF 3FB"></RowStyle>

      <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

      <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

      <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

      <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

      <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
      </asp:GridView>
      Last edited by jaredciagar; Feb 25 '08, 06:45 AM. Reason: wrong

      Comment

      • jaredciagar
        New Member
        • Feb 2008
        • 16

        #4
        Originally posted by jaredciagar
        Can You write it in vb script?please.. .Thank You

        I'm Using ASP.net and MS SQL2005 and I'm using VB SCRIPT

        Here is my code:

        Code: ( vbnet )
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
        Dim con As New SqlConnection

        con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

        Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
        Dim myCommand As New SqlCommand(strS QL, con)
        con.Open()
        GridItemcodeSum m.DataSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
        GridItemcodeSum m.DataBind()

        end sub



        ----------HTML-------------

        <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px">
        <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
        <Columns>
        <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
        <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
        <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
        <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

        </Columns>

        <RowStyle BackColor="#EFF 3FB"></RowStyle>

        <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

        <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

        <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

        <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

        <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
        </asp:GridView>
        I'm Using ASP.net and MS SQL2005 and I'm using VB SCRIPT

        Here is my code:

        Code: ( vbnet )
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
        Dim con As New SqlConnection

        con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

        Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
        Dim myCommand As New SqlCommand(strS QL, con)
        con.Open()
        GridITPSumm.Dat aSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
        GridITPSumm.Dat aBind()

        end sub



        ----------HTML-------------

        <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px">
        <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
        <Columns>
        <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
        <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
        <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
        <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

        </Columns>

        <RowStyle BackColor="#EFF 3FB"></RowStyle>

        <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

        <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

        <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

        <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

        <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
        </asp:GridView>

        That is for GridItemCodeSum mary...How Can I write the code for GridItemcodeDet ails...Thank You

        Comment

        • numena79
          New Member
          • Oct 2007
          • 4

          #5
          I've added the additional code you might need to put in... Please see the code in bold below,

          Code: ( vbnet )
          Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
          Dim con As New SqlConnection

          con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

          Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
          Dim myCommand As New SqlCommand(strS QL, con)
          con.Open()
          GridITPSumm.Dat aSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
          GridITPSumm.Dat aBind()



          end sub

          Sub GridItemcodeSum m_SelectedIndex Changed(ByVal sender As Object, ByVal e As EventArgs)

          Dim itemCode as String = GridItemcodeSum m.SelectedDataK ey.Value.ToStri ng()

          Dim con As New SqlConnection

          con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

          'this SQL query depends on how your details table looks like. This is just an example
          Const strSQL As String = "SELECT * FROM tblDetails WHERE ItemCode = " & itemCode
          Dim myCommand As New SqlCommand(strS QL, con)
          con.Open()
          GridItemcodeDet .DataSource = myCommand.Execu teReader
          GridItemcodeDet .DataBind()

          End Sub




          ----------HTML-------------

          <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px" DataKeyNames="i ntItemCodePK" OnSelectedIndex Changed="GridIt emcodeSumm_Sele ctedIndexChange d">
          <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
          <Columns>
          <asp:CommandFie ld ShowSelectButto n="True">
          </asp:CommandFiel d>

          <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
          <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
          <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
          <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

          </Columns>

          <RowStyle BackColor="#EFF 3FB"></RowStyle>

          <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

          <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

          <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

          <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

          <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
          </asp:GridView>

          <!-- Item Details Gridview -->
          <asp:GridView ID="GridItemcod eDet" runat="server">
          </asp:GridView>

          Comment

          • jaredciagar
            New Member
            • Feb 2008
            • 16

            #6
            Originally posted by numena79
            I've added the additional code you might need to put in... Please see the code in bold below,

            Code: ( vbnet )
            Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
            Dim con As New SqlConnection

            con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

            Const strSQL As String = "SELECT intItemCodePK,s trsubmitter,dat Requested,datRe quired FROM tblITPtransacti on"
            Dim myCommand As New SqlCommand(strS QL, con)
            con.Open()
            GridITPSumm.Dat aSource = myCommand.Execu teReader(Comman dBehavior.Close Conne ction)
            GridITPSumm.Dat aBind()



            end sub

            Sub GridItemcodeSum m_SelectedIndex Changed(ByVal sender As Object, ByVal e As EventArgs)

            Dim itemCode as String = GridItemcodeSum m.SelectedDataK ey.Value.ToStri ng()

            Dim con As New SqlConnection

            con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

            'this SQL query depends on how your details table looks like. This is just an example
            Const strSQL As String = "SELECT * FROM tblDetails WHERE ItemCode = " & itemCode
            Dim myCommand As New SqlCommand(strS QL, con)
            con.Open()
            GridItemcodeDet .DataSource = myCommand.Execu teReader
            GridItemcodeDet .DataBind()

            End Sub




            ----------HTML-------------

            <asp:GridView id="GridItemcod eSumm" runat="server" Width="606px" Height="18px" ForeColor="#333 333" AllowSorting="T rue" AllowPaging="fa lse" CellPadding="4" AutoGenerateCol umns="False" Font-Size="Smaller" Font-Overline="False " Font-Names="Arial" EnableViewState ="False" Font-Bold="False" style="left: 2px; position: relative; top: -33px" DataKeyNames="i ntItemCodePK" OnSelectedIndex Changed="GridIt emcodeSumm_Sele ctedIndexChange d">
            <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>
            <Columns>
            <asp:CommandFie ld ShowSelectButto n="True">
            </asp:CommandFiel d>

            <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
            <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
            <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
            <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>

            </Columns>

            <RowStyle BackColor="#EFF 3FB"></RowStyle>

            <EditRowStyle BackColor="#246 1BF"></EditRowStyle>

            <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>

            <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>

            <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>

            <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
            </asp:GridView>

            <!-- Item Details Gridview -->
            <asp:GridView ID="GridItemcod eDet" runat="server">
            </asp:GridView>
            hi numena79 ,

            Thank You for your support but I got an error when I write your code...
            Can you help me please in debugging your code....
            The errror is : "Constant Expression is Required"

            The error is point out in vb script part of the code:
            Const strSQL As String = "SELECT * FROM tblDetails WHERE ItemCode = " & itemCode


            Thank you

            Comment

            • jaredciagar
              New Member
              • Feb 2008
              • 16

              #7
              Passing the selected datakeyname is ok but the gridviewdetails was not displaying...
              what should I do?
              Here is the code:
              -----------VB Code:-----------------------
              Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)

              Dim con As New SqlConnection


              con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

              Const strSQL As String = "SELECT intITPCodePK,st rsubmitter,datR equested,datReq uired FROM tblITPtransacti on"
              Dim myCommand As New SqlCommand(strS QL, con)

              con.Open()
              GVITPSumm.DataS ource = myCommand.Execu teReader(Comman dBehavior.Close Connection)
              GVITPSumm.DataB ind()
              End Sub


              Sub GVITPSumm_Selec tedIndexChanged (ByVal sender As Object, ByVal e As EventArgs)
              Dim con As New SqlConnection

              con.ConnectionS tring = "Integrated Security=True;d ata source=ph-erwinm1;" & "persist security info=false;Init ial Catalog=ITP"

              Dim ITPCode As String
              Dim strSQL As String
              ITPCode = GVITPSumm.Selec tedDataKey.Valu e.ToString()

              strSQL = "SELECT intITPCodeFK, intItemCodePK, strItemType, intQuantity FROM tblItemList WHERE intITPCodeFK = '" & Trim$(ITPCode) & "'"

              Dim myCommand As New SqlCommand(strS QL, con)
              con.Open()
              GVITPDetails.Da taSource = myCommand.Execu teReader(Comman dBehavior.Close Connection)
              GVITPDetails.Da taBind()

              End Sub




              ---------HTML Code -------------------

              <asp:GridView style="LEFT: 2px; POSITION: relative; TOP: -33px" id="GVITPSumm"
              runat="server" Width="606px" Height="18px" OnSelectedIndex Changed="GVITPS umm_SelectedInd exChanged"
              DataKeyNames="i ntITPCodePK" Font-Bold="False" EnableViewState ="False" Font-Names="Arial"
              Font-Overline="False " Font-Size="Smaller" AutoGenerateCol umns="False" CellPadding="4"
              AllowPaging="fa lse" AllowSorting="T rue" ForeColor="#333 333">
              <FooterStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></FooterStyle>

              <Columns>
              <asp:CommandFie ld ShowSelectButto n="True">
              </asp:CommandFiel d>
              <asp:BoundFie ld DataField="intI TPCodePK" SortExpression= "intITPCode PK" HeaderText="ITP Code"></asp:BoundField>
              <asp:BoundFie ld DataField="strs ubmitter" SortExpression= "strsubmitt er" HeaderText="Sub mitter"></asp:BoundField>
              <asp:BoundFie ld DataField="datR equested" SortExpression= "datRequest ed" HeaderText="Dat e Requested"></asp:BoundField>
              <asp:BoundFie ld DataField="datR equired" SortExpression= "datRequire d" HeaderText="Dat e Required"></asp:BoundField>
              </Columns>

              <RowStyle BackColor="#EFF 3FB"></RowStyle>
              <EditRowStyle BackColor="#246 1BF"></EditRowStyle>
              <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>
              <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>
              <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>
              <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
              </asp:GridView>




              <asp:GridView id="GVITPDetail s" runat="server" AutoGenerateCol umns="False" DataKeyNames="i ntITPCodeFK">
              <Columns>
              <asp:BoundFie ld DataField="intI TPCodeFK" SortExpression= "intITPCode FK" HeaderText="ITP Code"></asp:BoundField>
              <asp:BoundFie ld DataField="intI temCodePK" SortExpression= "intItemCod ePK" HeaderText="Ite m Code"></asp:BoundField>
              <asp:BoundFie ld DataField="strI temType" SortExpression= "strItemTyp e" HeaderText="Ite m Type"></asp:BoundField>
              <asp:BoundFie ld DataField="intQ uantity" SortExpression= "intQuantit y" HeaderText="Qua ntity"></asp:BoundField>
              </Columns>

              <RowStyle BackColor="#EFF 3FB"></RowStyle>
              <EditRowStyle BackColor="#246 1BF"></EditRowStyle>
              <SelectedRowSty le BackColor="#D1D DF1" ForeColor="#333 333" Font-Bold="True"></SelectedRowStyl e>
              <PagerStyle BackColor="#246 1BF" ForeColor="Whit e" HorizontalAlign ="Center"></PagerStyle>
              <HeaderStyle BackColor="#507 CD1" ForeColor="Whit e" Font-Bold="True"></HeaderStyle>
              <AlternatingRow Style BackColor="Whit e"></AlternatingRowS tyle>
              </asp:GridView>



              Thank You in Advance

              Comment

              Working...