Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 08, 2007 07:32 PM by saqib_dotnet
Jul 28, 2007 07:07 AM|LINK
I want to have datagrid inside the usercontrols and I want to call usercontrol from master page. And I want to use ajax control toolkit modelpopup , so when user clicks linkbutton inside the datagrid, it will model pop up panel pops up.. How can I achieve
that? Any example would be great..
I already created my usercontrol that datagrid in it and created website that gets the content from master page. Now, I need to know how to plug ajax to masterpage and also use modelpopupextender? If I put script manager inside the master page, if some of
my other application I don't want to use ajax would be effected? Because I have a lot of existing code that uses masterpage, I just don't want script manager or update panel to cause any problem to the other pages don't use ajax...
Jul 28, 2007 09:20 PM|LINK
You can add a scriptmanager to the masterpage and it will not cause problems with other pages that don't use ajax. The sample website shows you how to use the modalpopup and you don't need to do anything special to get this working for a datagrid. If you
want to load the modalpopup with data related to the row of the datagrid then you will probably want to do an ajax postback when the row is clicked and show the modalpopup programmatically (as per the example on the sample website).
Jul 28, 2007 09:35 PM|LINK
"If you want to load the modalpopup with data related to the row of the datagrid then you will probably want to do an ajax postback when the row is clicked and show the modalpopup programmatically "
this is exactly how I want. My datagrid has checkbox, and linkbutton right, when checkbox clicks linkbutton gets enable. Then linkbutton gets clicks that will fire up model pop up panel . How would you set the update panel according to this senario?
Jul 28, 2007 09:45 PM|LINK
Wrap the grid in an updatepanel and then when a linkbutton is clicked, postback and load the modalpopup with whatever content you require and call the Show() method to make the modalpopup visible.
Jul 28, 2007 10:10 PM|LINK
I did first one you said, but I don't know how to make linkbutton postback, because it is in datagrid.
Jul 28, 2007 10:20 PM|LINK
The linkbutton will automatically postback regardless of whether it is in a datagrid or not. Just hook up an OnClick event handler as you normally would.
Jul 29, 2007 04:41 AM|LINK
for some reason my page is not updating at all. I have created master page and put the scriptmanager inside, then I created datagrid and wrap it with update panel, I put my oncheckchange event handler for checkboxes and onclick event for link button, both
of my events working fine without ajax , I think I am doing something wrong either with script manager or update panel, I cannot figure it out.
Jul 29, 2007 05:32 AM|LINK
Please post the source code for the page and code behind.
Jul 29, 2007 07:13 AM|LINK
I am really sorry, It is really long one, I wanted to post whole page, so you can see where did I put my Update panel , model pop up too, right now, my Oncheckchange on server side working good, enables link button too, but when link button clicked it is
not displaying model pop up panel. I have draw a lines below those code is important and related. Thank you for your help...
this is the page aspx
position: relative; top: 22px"></
position: relative; top: 24px"></
position: relative; top: 25px"></
left: 23px; position: absolute; top: 408px"
left: 261px; position: absolute; top: 359px"
background-color: gainsboro; left: 4px; top: 0px;">
position: absolute; top: 494px;"
Other document, please specify
myDropOver.SelectedIndex = 0
I have Row changed event handler for enabling disabling checkboxes and linkbuttons this way on oncheckchanged eventhanler.
Then my what happens when link clicks
lstpolicy.DataSource = Fill_ListBox()
Jul 29, 2007 08:05 PM|LINK
Any idea why pop up is not showing?