Saturday, March 24, 2012

Problem in Binding Gridview through Modal popup

Hi,

I have a gridview inside a Panel which i being is shown byModalPopupExtender, and i am also using

DynamicServiceMethod -- to call a code_behind method , which inturn binds data from a data set to the gridview inside the panel.

But at the front end, i am unable to see any grid, all that i can see is just the empty pop-up(Modal). Need help on how

to bind dynamic data to modal pop.

thanks

Vishaal

It is the continuation of above problem

<ajaxToolkit:ModalPopupExtender

ID="ModalPopupExtender"runat="server"TargetControlID="imgBtnContinue"PopupControlID="pnlDiscounts"BackgroundCssClass="modalBackground"OkControlID="OkButton"OnOkScript="onOk()"CancelControlID="CancelButton"DropShadow="true"PopupDragHandleControlID="Panel3"DynamicServiceMethod="test()" (code behind method)DynamicControlID="gvDiscountDisplay" (grid inside panel) />

when i am clicking "imgBtnContinue" .. an javascript error is raised " Sys.ArgumentException: Value must not be null for Controls and Behaviors.

Parameter name:element


<ajaxToolkit:ModalPopupExtender

ID="ModalPopupExtender"

runat="server"

TargetControlID=" <Set target Id to some dummy control id>"

PopupControlID="pnlDiscounts"

BackgroundCssClass="modalBackground"

OkControlID="OkButton"

OnOkScript="onOk()"

CancelControlID="CancelButton"

DropShadow="true"

PopupDragHandleControlID="Panel3"/>

And in the actual Button click(Code-behind) invoke theModalPopupExtender.show()

-Vishaal

1 comment:

Unknown said...

This is awesome!! really helpful for me. Thanks for sharing with us. Following links also helped me to complete my task.

http://www.codeproject.com/Articles/439688/Creating-ASP-NET-application-with-n-tier-architect

http://www.mindstick.com/Articles/eef68c81-0927-4317-8387-d8d98e876f7c/?FileUpload%20in%20GridView%20with%20Ajax%20Modal%20Popup

Post a Comment