I want my popup to display user data (possibly with edit/delete options). I've handle following function to the RowDBclick:
popupControl.Show(grid.GetSelectedKeysOnPage());
And in the popupControl I've set Popup Element Id to grid which is my ClientInstanceName of the GridView. The popup appears but with no data. What do I do wrong? How to display user data of the clicked row id? If I set Choose data source in Popup task panel to my db ConnectionString, the popup doesn't appear.
There is no client-side Show method for ASPxPopupControl that accepts an array of values. ASPxClientPopupControlBase.Show Method. You need to perform a callback on the PopupControl (PerformCallback), populate its controls with required values obtained from the grid in the server-side WindowCallback event handler. After this show the popup.
Related
I would like to direct a user to a page within an app using a field value from a model. The model is loaded into a grid and the user makes a selection to navigate to a page within the app based on images displayed in the grid cells.
I am thinking to use the app.showPage(app.pages.Page) for the onClick event and passing in the page the user should be directed from the model as a parameter such as widget.datasource.item.PageName.
Can you suggest how the name of the page could be passed in from the datasource as as variable to the onClick event accomplish this navigation?
Will appreciate any help!
Lets say you are storing your page names in your datasource under a field PageName (string field) such as YourPageName1, YourPageName2, etc. Then for your onClick event all you would need is:
app.showPage(app.pages[widget.datasource.item.PageName]);
i have made a user control as report .Now this control has a button on whose click another user control is being called.the values gets passed correctly,also gets binded to the grid ..but finally the second control doesn't get displayed on the screen .I can't paste my code here since it is very long.am i missing out nothing for interaction between two user controls?
try to check the BringToFront method,
have a look on this link
What I want is to open a new popup from the server side, this pop up has a form with three fields, and then return this three fields to the parent page. But I want this fields in the server side, in the VB.NET code. Is this possible?
Is a modal popup window acceptable? If so, you could put the variables in an update panel, and use the server side event of the button that causes a postback on the modal to force the the update panel to update.
Create a form to show as popup
Display it
Perform a POST request onto the parent form to pass the values
or
save input into Session vaariable and read it on popup close
I have a GridView on PageA, I wish to be able to call the DataBind() method of the GridView from PageB?
Basically PageB is a form which will be contained in a pop up control, when the user fills in the fields of the form on PageB and submits it I will close the pop up control, then I want to refresh the GridView on the parent page (PageA), how would I go about doing that?
Write a javascript function on Page A like RefreshGrid, you can write various ways to refresh grid from this javascript function e.g.
1) put your grid inside an update panel and create a trigger button control on that update panel , call this trigger control's click event in javascript , this will partial post back the page and refresh the update panel. There are other ways too..
2) From popup on popup close button, write following line
window.opener.RefreshGrid(); window.close();
Thats it.
If you want to pass any parameter you can pass through as argument to RefreshGrid function.
Still there are many ways , this is the one I use.
I have on server control(dropdown) and One button.user can select some values in dropdown and click button.I have to show a pop-up.In this pop-up I have show data based upon value selected in dropdown.How to access a dropdown in codebehind of pop-up screen.I am loading a .aspx in pop-up using javascript.
Why not just pass the selected value of the dropdownlist as a querystring parameter to the popup page?
That's the way i'd do it.
If you dont want to do it that way, you can access the parent window by using window.opener.document.
So something like:
window.opener.document.getElementById('yourDDLId').value;
Still i'd recommend passing through as querystring param. Simple and easy.