Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<contenttemplate>
VB
<asp:ListView ID="listJob" runat="server"OnItemCommand="listJob_ItemCommand" InsertItemPosition="LastItem"OnItemUpdating="listJob_ItemUpdating"OnItemDataBound="listJob_ItemDataBound"OnItemEditing="listJob_ItemEditing"OnItemCanceling="listJob_ItemCanceling" DataKeyNames="ShortEmpRptID"onitemcreated="listJob_ItemCreated">

C#
<InsertItemTemplate>
    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
</InsertItemTemplate>
  </ContentTemplate>
</asp:UpdatePanel>


Insert command will be fired on following event :
C#
protected void listJob_ItemCommand(object sender, ListViewCommandEventArgs e) {

          try
          {
              if (e.CommandName == "Insert")
              {

}
}
}

I want to update listview after insertion. How to update listview ? Thanks in advance
Posted
Comments
DamithSL 19-Jan-15 1:47am    
rebind data to listview
m-shraddha 19-Jan-15 2:23am    
I did it but still not working
DamithSL 19-Jan-15 2:31am    
update the question with your code, how you load initial data?
m-shraddha 19-Jan-15 11:09am    
initial data is loaded after clicking search button.I am binding data to listview using DataSource.. Which code do you want to see?
deepakdynamite 19-Jan-15 3:31am    
use UpdatePanel.Refresh();

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