views:

305

answers:

3

hi

i have master page update panel also. When i child page have delete function. when i delete the row from grid. after i rebind the grid. Then also i cannot see refreshed grid.

how to update the panel or grid?

regards Dhanraj.S

A: 

asp.net gridview

Dhanraj
A: 

try the following:

ctype(me.Page.Master.FindControl("UpdatePanel1"),UpdatePanel).Update()

Himadri
A: 

Setup your UpdatePanel like this:

  <asp:UpdatePanel ID="UpdatePanel1" runat="server"
        ChildrenAsTriggers="True"  UpdateMode="Always">
      <ContentTemplate>
                       ...
      </ContentTemplate>
  </asp:UpdatePanel>

NOTE: GridView and DetailsView controls are not compatible with the UpdatePanel when their EnableSortingAndPagingCallbacks property is set to true. The default is false.

Using UpdatePanel Controls in Master Pages

UpdateMode Property :

The content of an UpdatePanel control is updated in the following circumstances:

  • If the UpdateMode property is set to Always, the UpdatePanel control's content is updated on every postback that originates from anywhere on the page. This includes asynchronous postbacks from controls that are inside other UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.
  • If the UpdatePanel control is nested inside another UpdatePanel control and the parent update panel is updated.
  • If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
    • You call the Update method of the UpdatePanel control explicitly.
    • The postback is caused by a control that is defined as a trigger by using the Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the UpdatePanel control that defines the trigger.
    • The ChildrenAsTriggers property is set to true and a child control of the UpdatePanel control causes a postback. A child control of a nested UpdatePanel control does not cause an update to the outer UpdatePanel control unless it is explicitly defined as a trigger.
rick schott