1
Reply

how to display gridview in right side when i click the drop

narasiman rao

narasiman rao

Nov 1 2015 1:49 AM
456
  My design as follows

Branch ddlbranch(dropdownlist)

One gridview (gvResult) gridview name

Type ddlfeedbacktype (dropdownlist)
Subject txtsubject(textbox)
Comments txtcomments(textbox)

Submit(Button)

When i click ddlbranch (dropdownlist) i want to show the gridview (gvResult)
Gridview is displaying no problem.

But i want to display the Gridview (gvResult) in righ side. when i click the ddlbranch (dropdownlist).

My source as follows 
 
<asp:Panel ID="ff" runat="server" Height="451px" BackColor="Bisque"
BorderColor="BlanchedAlmond" BorderStyle="Groove" Width="931px">
 
<table style="height: 165px; width: 301px">
 
<tr>
       <td>
           <asp:Label ID="lblbranch" runat="server" Text="Branch"></asp:Label>
           <asp:DropDownList ID="ddlbranch" runat="server"
          onselectedindexchanged="ddlbranch_SelectedIndexChanged">
<asp:ListItem>KALPAKKAM</asp:ListItem>
<asp:ListItem>KILPAUK</asp:ListItem>
<asp:ListItem>TIDELPARK</asp:ListItem>
</asp:DropDownList>
 
<asp:Panel ID="pnlresult" runat="server">
 
<asp:GridView ID="gvResult" runat="server" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black"
GridLines="None">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
 
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
 
  </asp:Panel>
</td>
    </tr>
<tr>
       <td>
   <asp:Label ID="lblfeedbacktype" runat="server" Text="Type"></asp:Label>
   <asp:DropDownList ID="ddlfeedbacktype" runat="server">
     </asp:DropDownList>
    </td>
</tr>
<tr>
          <td>
    <asp:Label ID="lblsubject" runat="server" Text="Subject"></asp:Label>
       <asp:TextBox ID="txtsubject" runat="server"></asp:TextBox>
         </td>
</tr>
<tr>
 
      <td>
        <asp:Label ID="lblcomments" runat="server" Text="Comments"></asp:Label>
           <asp:TextBox ID="txtcomments" runat="server"></asp:TextBox>
      </td>
</tr>
 
 
<tr>
         <td>
              <asp:Button ID="btnSave" ForeColor="Blue" runat="server" Text="Submit" BackColor= "SaddleBrown"
                 BorderColor="BlanchedAlmond" BorderStyle="Ridge" Width="242px" />
         </td>
</tr>
</table>
</asp:Panel>
 
When i click the dropdownlist (ddlbrnach) i want to show the gridview in right side not in below of dropdownlist.
from my above source what changes i have to made to get correct output.

Regards,
Narasiman P. 
 
 
 
 
 
 

Answers (1)