Displaying different forms in kendo window on click of different buttons - asp.net-mvc

I have 3 buttons and, on click of every button, totally different content has to be loaded in kendo window. I am doing this in MVC. How to do this?

Your best solution is to create 3 different windows and, in Javascript, when you click on a button, you open the window and close others.
Or, you can also create only one window and load it's content dynamically when a button is clicked. But you have to deal with Kendo Window API.
If you want to reload the content of a window, see this link.

Related

Menu static - content below - in tabs?

I'm new to electron and some principles, concept of doing things in it.
For now i created a window, with a index.html inside and the standard main.js and the bootstrap css. Here is what I've done so far: Image
Now I'm getting to the point "what to do now to get the content when clicking on the links in the menu?"
The main goal is a menu at the top and load content from different websites below that menu.
I don't get how to load that content (maybe in tabs?)?
The best would be not to load the content twice, if someone clicked on that menu points at the top. So if once clicked to Calendar the calendar should not opened a second time, instead it should jump to the according tab. Content should be scrollable while the menu should stay at the top.
What's the way to go here? Tabs? Is the idea even possible?

Tabbed control for Delphi?

I'm using Delphi XE8.
I want to create a tabbed control, with each tab having its own panel. I tried TTabControl, for which I can create different tabs. But when I drop a component on the control with the first tab active, it remains visible when I change the tab (TabIndex). How can I in design time create different layouts for the different tabs? Or am I using the wrong component?
You are using the wrong component. You need to use TPageControl. Each page of a page control has its own distinct set of controls. From the documentation:
TPageControl is a set of pages used to make a multiple page dialog
box.
Use TPageControl to create a multiple page dialog or tabbed notebook.
TPageControl displays multiple overlapping pages that are TTabSheet
objects. The user selects a page by clicking the page's tab that
appears at the top of the control. To add a new page to a TPageControl
object at design time, right-click the TPageControl object and choose
New Page.
To create a tabbed control that uses only a single body portion
(page), use TTabControl instead.

Opening Kendo popup window for adding new records

I have an separate Add button (neither on toolbar, nor on grid) and I want to open a popup window (having some fields) after clicking this button in order to create a new record. I have a look at the Kendo Demo pages, but all the samples use grid's or toolbar's Create button. Instead of them, a need a sample with a separate button. Any sample please?
Update: I want to create a listview as shown below instead of grid:
If you call dataGrid.addRow() method and edit mode is set to "popup", Popup window will be displayed.
Look at this dojo

Kendo grid inside splitter next page

Here's my layout. I'm using a Kendo splitter control. The left pane contains a menu and the right is the main content. Some of the content pages contain kendo grids that can contain several pages of data. My problem is that when the user clicks on the next page of the grid, it performs a post back and the whole page refreshes taking the user back to the home page. The left menu loads the right panel using javascript. Does anyone know how to get around this?
In another words, I need the grid to load the next page and target the right side of the splitter control. How do I "Ajaxify" the next page of the grid control?
It sounds like your Grid is configured for Server Binding - if so you need to change it to Ajax binding and there is not other way to put it inside a Splitter which content is loaded with Ajax.

ASP.NET MVC Show a MessageBox

I have a ASP.net MVC application. On one page I have a button and when user clicks on it I need to display some information on a pop up window. How can I do that in ASP.NET MVC? What do I use and where do I write the code for pop window? In the controller? Some java script?
Thank you!!
You can display messages with javascript. The content of the message can be set in the markup or by your Controller as a Model property. You have a few display options:
Use the alert() function, which will display a native browser dialog
Display a styled modal dialog (E.g. jQuery UI dialog)
Display a styled div (E.g. jQuery UI Message - shameless plug, this one of my open source projects)
The alert function isn't very pretty, but it's the simplest. I typically go with a modal dialog or a styled div, depending on the UI requirements.
If the information you want to display in a pop up is dynamic (i.e you need some c# logic to run) then I'd suggest putting that logic in a controller and have the corresponding view be the pop up itself. You can stick some JavaScript at the top of the view to launch the popup on load.
The page with the button trigger can call that controller and pass any data needed. To make it smooth maybe make the trigger use Ajax.

Resources