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.
Related
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.
In my continuing effort to build out my form validation controls, I've gotten to the dropdownlist control and ran into a snag when I tried to customize this one.
I've tried using the TagBuilder and a simple String in extension methods to extend this control but when I try to "bind" it to a list on the back end, it's not actually binding any data to my dropdownlist. I'm sure I'm missing something (IEnumerable or the like) on my custom control but I have no idea what....any suggestions (code samples would be terrific) would be awesome.
thanks
You can go through the ASP.NET MVC source and get an idea as to how it is implemented.
Go through the License as well!!
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
I'm using Sharepoint 2010 (as a beginner). I need to find the best way to allow a user to create a new page inside a sharepoint site. The page must have an image field which the user can crop when he creates the page.
I have 3 problems concerning this:
How can I allow my user to create the page in a single step. The default behaviour is: create page with Title, Url and Content type and the edit the page layout or the page properties. Is there a way to do this in a single step?
What view should my user use when editing the page? The "Edit page" view, or the "Edit properties"? I don't like the "Edit page" view because... it doesn't look like the right way to do it... BUT, I like the fact that I can use my custom BaseFieldControls in this view. The "Edit properties" look great, BUT, customizing it looks like a nightmare. And, of course, I cannot ask the user to use both views...
One of my requests is to allow the user to upload a sharepoint image for the page, and then to crop tree different sizes using the base image. The big question is: where should I allow my user to do this?
In a webpart inside the "Edit properties" window? - Not very easy to integrate it. It seems almost impossible.
In a custom BaseFieldControl in the "Edit page"? Would be great, but, I don't want the user to use this view.
Create my own Asses Picker aspx page for the "Upload image" field, and replace the default one - _layouts/AssetImagePicker.aspx? Is this even possible?
I dont have an answer for everything but for number 1, maybe:
Check out SPServices. It is a Jquery project which is designed to help people use Jquery on Sharepoint sites. It is really useful for accessing, editing, and writing data is less lines of code than ever before... Unless you are a genius and have SP figured out which most do not.
To be honest, the only way to do things in "1 step" is with javascript anyway...
Hopefully you have heard of Jquery:
In Telerik documentation we must use server binding when binding complex objects.
How can we activating Insertion and Editing mode in Telerik mvc grid with ajax binding of complex objects?
how we can customize the whole of insert form and edit form
ie. drawing drop down lists for properties of reference types
thanks in advance
How about using server edit template for that, is it applicable? I crawled the online MVC demos on their site and hit upon this one.
I found a solution.
I am using Client Edit Templates for this scenario but there is a problem in the ScriptRegisterar I think, the problem related to registering Telerik DropDown javascript files.
I made initial solution which is to add a line of code to the ScriptRegisterar to explicit register the javascript file "telerik.list.js"
OR add a dummy Telerik DropDown list in the same page where you want it to appear in the grid, and you have to hide it using css.
This is a bug in the final version of telerik 2010.3.1110
Telerik has released the hotfix for this bug in the version 2010.3.1111
check the link and download the hotfix:
http://www.telerik.com/community/forums/aspnet-mvc/grid/script-registrar-not-loading-scripts-for-controls-used-in-client-templates.aspx