Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have one gridview inside of updatepanel

In grid view i have one dropdown list...

i am selecting id from dropdown list...
and showing other data in other grid view on dropdown select change event...

Data is coming in dataset but not showing in gridview...

Other Grid View Not In Update Panel....

if i remove update panel so its working...
plse solve this problem.....

C#
<asp:ScriptManager ID="ScriptManager1" runat="server">
   
      
  
  <asp:UpdatePanel ID="UP" runat="server">
  <contenttemplate>
  <asp:gridview ID="Gridview2" runat="server" ShowFooter="True"
    AutoGenerateColumns="False">
    <columns>
      <asp:TemplateField HeaderText="Supplier Name">
        <edititemtemplate>
          <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RowNumber") %>'>
        </edititemtemplate>
        <itemtemplate>
          <asp:DropDownList ID="Drp_Supp" runat="server" AutoPostBack="True"
            onselectedindexchanged="Drp_Supp_SelectedIndexChanged">
            <asp:ListItem>Select Supplier
            <asp:ListItem>1
            <asp:ListItem>2
            <asp:ListItem>3
            <asp:ListItem>4
            <asp:ListItem>
          
        </itemtemplate>
      
    <asp:TemplateField HeaderText="Reference Number">
      <itemtemplate>
        <asp:TextBox ID="Txt_Refr" runat="server">
      </itemtemplate>
    
    <asp:TemplateField HeaderText="Total Amount">
      <itemtemplate>
        <asp:TextBox ID="Txt_Tam" runat="server">
      </itemtemplate>
    
    <asp:TemplateField HeaderText="VAT RATE">
      <itemtemplate>
        <asp:TextBox ID="Txt_Vat" runat="server">
      </itemtemplate>
    
    <asp:TemplateField HeaderText="Nominal Account">
      <itemtemplate>
        <asp:TextBox ID="Txt_NAc" runat="server">
      </itemtemplate>
    
     <asp:TemplateField HeaderText="Paid Amount">
      <itemtemplate>
        <asp:TextBox ID="Txt_Pam" runat="server">
      </itemtemplate>
    
 
 
 
    <asp:TemplateField HeaderText="Save">
      <itemtemplate>
        <asp:Button ID="Bt_Save" runat="server" Text="Save" />
      </itemtemplate>
      <footerstyle horizontalalign="Right" />
      <footertemplate>
       <asp:Button ID="ButtonAdd" runat="server" Text="Add New Row"
          onclick="ButtonAdd_Click" />
      </footertemplate>
    
    </columns>

 
 
</contenttemplate>
Posted
Updated 20-Sep-11 2:19am
v2

1 solution

Hi,

You said you are showing data in another gridview which is not present in update panel right?

dropdownlist is in update panel so you can not update controls which are not present in update panel with dropdownlist events

Try to learn Jquery.

you can retrieve html data from server in asynchronous requests.

If you want to learn follow this links

http://www.asp.net/ajaxlibrary/jquery_dibs.ashx

And
http://docs.jquery.com/Tutorials

Step into Jquery.you can get best experience with Jquery in webapplications

coming to you question ...

you said by removing update panel it was working.

The reason is just In said before.you can achieve this without full page refreshing using only with Jquery.


All the Best
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900