passing values between parent and child windows - asp.net-mvc-3

I am really new to MVC 3 and need a help on this.
I have a parent window with a listbox and a child window that is a pop up. The child window has a checkbox list and i need to populate the parent window's listbox when items are selcted in the child window's checkboxlist. How to acheive this in mvc 3 razor ?

I think you're actually looking for something more than just a Razor answer here, you're looking for JavaScript.
Razor is just a generator - you use it to build HTML, JavaScript (or email or XML or JSON or whatever text you want). Now, it's a really good generator, but it can't do the notification things you're looking to do.
JavaScript, however, will let you pass a message to the server from the popup window, and the parent window can use JavaScript to poll the server for messages.
One way to do this without writing the plumbing yourself is to use a library such as SignalR (located at https://github.com/SignalR/SignalR, or you can install it in your project through NuGet) which can handle the client->server->client communication for you.
On a separate note, if the "window" is just an in-page pop-up, you don't have to do anything nearly as complicated. You can just use script on the same page to control any of the DOM elements.
Hope this helps some, cheers.

Related

MFC:CDHtmlDialog Purpose/Usages to open other views?

I was thinking of writing a new app where a users selects an option of what procedure they want to perform and the view changes to that until done then goes back to the main menu. I came across CDHtmlDialog and looked like a nice easy way to add a nice looking menu using html. But I wonder if that is the purpose of that class? Can I set it up so when a button or graphic link is clicked it changes out the view to another one (I would need to use traditional things like CTreeView with CListView with a splitter) or is it more for staying within the HTML world?
Thanks.
From the MSDN MSDN documentation
CDHtmlDialog Class is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface.
From what I can gather from your post, I think you should consider SDI application using view classes that you want. To switch views on the command you do not need a splitter window. A static splitter is used to display a number of views in a different part of the splitter simultaneously.

How to display messages at MDI form level in VB6

Friends, I've a VB6 application. I'm using 1 MDI form and multiple child forms. Now what I require is, I want to show some messages depending on the child forms(like-If there is no data in the database,then message will be "Enter master data first", messages regarding mandatory fields etc. etc.). I'm already using 1 status bar at lower end to display some other information. I don't want the display to be on the forms(child forms). I want it at MDI level. Is it possible to do(As far I know, MDI form doesn't support keeping any control on it)? If yes then which VB6 control I should use?
I'm asking this question after trying many options. Without knowing, why do you downvote?
As far I know, MDI form doesn't support keeping any control on it
This is not entirely accurate. There are some controls you can put on an MDI form. In this case, you should add a picture box control, and then put another control within the picture box control. I have done this in my own application and it works well.
The proper way to do this is to create a event that handles messages in your application. The child forms would simply raise the event, then the MDI form would handle the event raised, and then the message would be displayed in whatever manner you choose. If you need more information on raising events and listening for them, here is a link that Google found for me.

Using a Telerik control inside a repeater

I am using the asp.net Repeater control. (My company is heavily invested in that, so I can't change it.)
I need a way to create a poup edit window, specific to the row the user clicked on in the repeater, so the user can edit the data in that record.
We have the Telerik controls to use, but I don't know which one. I saw the radwindow, but can find no examples of using it in a repeater. Frankly, Telerik documentation is confusing.
I prefer to use client-side code, ajax and web-services. I'd like to prevent post-backs.
1) Please give me a reference to a specific example of using the Telerik radwindow inside a repeater for this purpose.
OR
2) Clue me in to a better idea.
Thank you.
I don't think there are explicit examples with an asp Repeater, but I found this one with a GridView. The approach should be the same, as it is just another databound control - it shows an easy way to open a RadWindow on the client by passing some parameters (it is actually not possible to open it on the server, it is a client-side object).
Some more complex examples I found on their site here and here. They both update a grid, yet they show a nice way to use AJAX to prevent a full postback.

how to display a html page inside dynamically created silverlight child window

I want to a html page inside a dynamically created silverlight child window without telerik control.
The telerik control isn't doing anything you can't do yourself with enough effort - it's all just transparent user code.
So, you could create <div> and position it carefully just like the telerik control does - but of course this can be a lot of work (that's why folks would want to pay for their control).
This also only works when the plugin is windowless, which has lots of trade-offs (see MSDN - for example, accessibility support is greatly reduced or gone entirely, I can't recall which).
In out-of-browser mode, you can use the WebBrowser control, in case that helps should you wish to make your app available OOB later.
try one of these links:
1. http://forums.silverlight.net/forums/t/51784.aspx or
2. http://weblogs.asp.net/dwahlin/archive/2010/05/10/integrating-html-into-silverlight-applications.aspx
It can help

Win32 textBox in treeview

I want to add textbox in treeview as child of one of the parent node. Is it possible> If yes how to achieve this?
The native TreeView control isn't going to be helpful at all to make this work. Programming one yourself is a tricky proposition. It is however a very popular UI gadget. Any component vendor sells one, invariably called "TreeList".
You'll have to do some shopping if you want to use such a component from unmanaged C/C++. An ActiveX version of such a control is as close as you can get. Most component vendors have however put that in their legacy bag.
Depending on your requirements, you may be able to use the built-in label editing features of the Win32 tree view. See TVM_EDITLABEL.
To make an item act like an edit control, you could send this message yourself when the item is clicked. You could also use owner-draw techniques to make the item look more like an edit control when it isn't in label-editing mode.

Resources