asp Update Panel doesnt work for jquery dialog after postback
Hello,
I am very new to AJAX, javascript and client side scripting in general.
I have a div in which there is a table and two asp buttons one updates the table and other displays the detail information on a jquery dialog box. I have place the div in update panel so on clicking button it updates the table and updates the information which is to be displayed on dialog box.The dialog box contains some asp labels and component art grid. Problem is that on asynchronous postback componentart grid is not updated as well as the css applied on the labels is lost
Here is the Code:
<
div
id
="dialog"
style
="
background-color
:
#f6f6f6
;
display
:
none"
title
="Loyalty Program Details"
>
<
asp
:
UpdatePanel
ID
="upLItemMode"
runat
="server"
onload
="upLItemMode_Load">
<
ContentTemplate
>
<
td
align
="left"><
b
>
Name:
</
b
>
</
td
>
<
td
align
="left"><
asp
:
Label
ID
="LnameLabel"
Text
="My Loyalty Program"
runat
="server"></
asp
:
Label
></
td
>
<
td
align
="left"><
b
>
Loyalty Mode:
</
b
></
td
>
<
td
align
="left"><
asp
:
Label
ID
="lModeLabel"
Text
=""
runat
="server"></
asp
:
Label
></
td
>
<
td
align
="left"><
b
>
Expire Mode:
</
b
>
</
td
>
<
td
align
="left"><
asp
:
Label
ID
="eModeLabel"
Text
=""
runat
="server"></
asp
:
Label
></
td
>
</
ContentTemplate
></
asp
:
UpdatePanel
>
</
table
>
<
asp
:
UpdatePanel
ID
="upLItemGrid"
runat
="server"
onload
="LItemGrid_Load">
<
ContentTemplate
>
<
ComponentArt
:
Grid
GroupingNotificationText
="Loyalty Item Details"
AllowColumnResizing
="true"
SearchBoxCssClass
="GridSearchTextBox"
.
.
.
.
</ComponentArt:Grid></ContentTemplate></asp:UpdatePanel></td></tr>
<
td
colspan
="2"
align
="right">
<
img
src
="images/cancel.png"
onclick
="jQuery('#dialog').dialog('close'); return false"
width
="117"
height
="34"
border
="0"
onmouseout
="this.src = 'images/cancel.png'"
onmouseover
="this.src = 'images/cancelhover.png'"/>
</
div
>
Code Behind:
//Updates the label and grid
Heres the snapshot of modal dialog after the postback: