how to display an element of parent in iframe - iframe

newbie question
I have a multiselect box that i populate with some ajax and shape with some jquery.SO i dont want to repeat all these operations whenever an iframe shows up.
is it possible to reuse it ? ?

this has been an old question but i wanted to answer as it may help someone someday.
To avoid all the repeating Ajax calls , i just saved the data in objects ,then access the data from iframe to draw my elements.

Related

Xamarin Forms determine size text will consume

I believe I have seen this someplace before. I believe this is a way, based on knowing the text you are going to put in a control (say a label), that you can ask Xamarin Forms to tell you what the size of the control would be. If I recall correctly you used somaline like OnDevice and had to pass in the Text and the type of control. I just can't seem to find this now. Does anyone know if this is possible?
To be clear I am trying to address a defect in a third party control (SyncFusion DataGrid) I am using where the control is not sizing a grid column correctly. I was trying no to wait until the fix we released but I guess I will have to.
Syncfusion actually posted an updated that does finally seem to fix the problem of the columns not being sized correctly by width. I can't close this so I will just mark this as the answer.
For Syncfusion you can now do this:
mydatagrid.GridColumnSizer.Refresh();
mydatagrid.WidthRequest = mydatagrid.GetVisualContainer().ExtentWidth;

Flex/QNX scrolling gallery

I was hoping someone could give me some guidance on building an image gallery which loads images dynamically for a PlayBook application.I've uploaded a quick mockup of what I am trying to achieve, I want to dynamically load images into a QNX TileList or Flex equivalent and as the user scrolls through the list I want to call another 'page' of images dynamically. I have already produced an example which uses a custom cell renderer to dynamically load images but I am having problems when I attempt to identify when the user has reached the end of the list.
I have tried using the lastVisibleItem property of the list while the user is scrolling to identify if the last item visible in the list is also last in the DataProvider (so I know when I need to call for more images) but when I add images to the DataProvider it takes me back to the start of the list, can anyone tell me the reason for this?
Any advice on a different approach or how to modify the TileList would be greatly appreciated.
The scrollPosition automatically gets reset to 0 when you update the dataProvider. I've done workarounds that store the current scrollPosition before updating the dataProvider and then re-set it after the update to the dataProvider has completed. Let me know if you need some code sample and I'll see if I can dig something up.
Another option would be to use dataPaging. Here is a good example of how to do that:
http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/

MVC3 - Multiple select process for a large list of items

Whats the best way to do the following in MVC3 (razor). User needs to pick one more more items from a List and click on button. The list can run into 40 to 100 items. Thats where my problem is, I am looking to see if there is any other solution (other than a list box) to do this more efficiently. Right now, I think I can do this by using a combination(or only one of) of an Auto complete text box and a list box in MVC3. Also how can I use list box in MVC3 with hard coded list tems.Any suggestions/ideas? Thanks in advance for your feedback.
You might want to take a look at using a list search functionality as described in this post it uses a jQuery plug in and you could always hook it up through an jquery ajax to get further data back from an MVC action method.
If this doesn't help then let me know and I'll try and put together an example in the morning.
Hope this helps.
Check out "jQuery UI Multiselect" http://www.quasipartikel.at/multiselect/

How to make an entire jqGrid disabled/readonly

How can I make an entire jqGrid disabled/readonly?
I have a page with a logical "edit section" which I show when the user selects something to edit, and hide when the user is done editing (save or cancel). While the edit section is shown, I disable several other elements on the page. I would like to disable their ability to click in the jqGrid, so they can't change selected rows, re-sort, etc. But I cannot find a way to disable/enable the grid as a whole.
Apologies if this has been answered already - other questions seemed to focus on disabling only certain behaviors within the jqGrid.
Edit: Preferably, I'd like an approach that isn't dependent on yet another 3rd-party addon. Nothing wrong with them, of course! But my client has a degree of reluctance with them, so my life would be a little easier with a purely jQuery/jQueryUI/jqGrid solution. :)
You could use blockUI to block the grid.
Try using $("#lui_" + myGridId).show().
The grid has created this overlay internally an uses it as one part of the loader message.
You can just show it or hide it and it will disable/enable the grid for you.

popups in asp.net

i want to display the pop ups in asp.net page like how the stack over flow show the pop ups on the top of the site (you get the new answer for the question like that in a orange color) how can i write the code is there any free source code or any reference. thank you
Given below are the steps to achieve what you want.
Have a div (a container) to show your updates
Create a window.setTimeout to execute a JS function (AJAX)
In that function check for updates from server
Finally if there are any updates then show it in the div container
When there are updates then again setTimeout to make it invisible over a period of time (say 3 secs)
To achieve this in a very easy fashion use JS libraries like JQuery.
HTH
Thats not a 'popup', its probably just a standard DIV that has its height and content changed dynamically. You can do a "view source" on the page to locate the item, or use firebug (easier).
After looking, its a div called 'notify-container'.
These days, all that wizzery is generally done with jQuery
The asp.net ajax control toolkit has that. Check it out here.
I think you'll find that's done using a holding container at the top of the page, a timer to periodically query an AJAX enabled method for updates which replaces the content of the container based on the response.

Resources