it looks like nobody has posted on this.
I have a very typical set up, an ajax update panel is updated when a drop list of offices changes. Each form could have it's own values, for instance each store will have it's own list of employees. Here is where the fun begins. The form can be changed by the drop down (new office) or validated and submitted.
On drop down change, I create a new instance of the same rad combo, bind it to the current data, confirm that the correct data is bound. Then on the return trip I see selected the default user from the previous user. This is a composite control, and firebug shows me that the value for the "text box" that simulates the combo still has the old value. I'm suspecting onViewStateLoaded, but turning viewstate off for the Telerik didn't help any. II don;t need it anyway, cuz I have to put the selected value in another hidden to make a cross page post on submit. Any ideas before I hack this up really bad? Any will be appreciated.
I would answer your question directly, but I don't have enough info, as I was not able to duplicate the issue here locally.
Have you tried contacting Telerik support, or using their forums? I've found them to be quite responsive, even offer custom dll's for some solutions.
Like Jeff, I have a difficult time rebuilding your scenario from the description. The fastest way to solve this problem is to open a Telerik Support Ticket. If you can provide a basic sample the exhibits the problem, the support team will quickly respond with a solution. Don't miss that valuable part of your Telerik purchase! That's what separates commercial tools from unsupported options.
If you'd prefer to keep troubleshooting, I'd try stepping back and simplifying your scenario. It sounds like some hacking has already begun and I think that may be leading to unusual results.
Specifically, the step where you create a new RadComboBox on post should not be required. If you can share some more code examples, I'll be happy to help further.
Related
I've got a databound series of predefined shapes (Path with Data="" set) which each trigger the same event when clicked.
I'd like to programmatically access the mini form of the Path.Data property at runtime to be able to persist it.
In this case I could just name the elements and on click check which one, however I'd prefer a more generic solution.
There seem to be some WPF workarounds but I haven't seen any for WP7.
Does anyone know if this is possible? and if so, how to do it?
Thanks.
Looking in to if and how this may be possible I came across http://www.eightyeightpercentnerd.dreamhosters.com/?p=40 and even though it's quite old it explains how a paths data/geometry is parsed in Siverlight.
It leads me to think that you may be better off trying to find a different approach to solving your problem. :(
I'm working with ASP.NET 3.5 C#
I've seen a good few questions like this around but havn't actually come across any articles with the answer (maybe just been unlucky with my research!).
Basically I'm looking to have say 3 links (or buttons) on a page, which in turn will dynamically load a specific user control into an update panel with AJAX.
Then I would like the usercontrol loaded to be capable of handling postback within the update panel (basically no page refreshes) to do its processing and return output.
Is this possible?
Does anyone have any pointers to articles/blogs covering this?
I've seen many, but none covered handling postbacks from the user control or handling the postbacks within the update panel.
I may even have the wrong end of the stick here.
Any tips would be great to start me off :)
Cheers!
Have a look at this blog post.
It may not be exactly what you want (Postback issue), but can be a good alternative solution to get started with.
Stackoverflow members,
How do you currently find the balance between javascript and code behind. I have recently come across some extremely bad (in my eyes) legacy code that lends itself to chaos (someHugeJavafile.js) which contains a lot of the logic used in many of the pages.
Let's say for example that you have a Form that you need to complete.
1. Personal Details
2. Address Information
3. Little bit more about yourself
You don't want to overload the person with all the fields at once, so you decide to split it up into steps.
Do you create separate pages for Personal Details, Address Information and a Little bit more about yourself.
Do you create controls for each and hide and show them on a postback or using some update panel?
Do you use jQuery and do some checking to ensure that the person has completed the required fields for the step and show the new "section" by using .show()?
How do you usually find the balance?
First of all, let's step back on this for a moment:
Is there a CMS behind the site that should be considered when creating this form? Many sites will use some system for managing content and this shouldn't be forgotten or ignored at first glance to my mind.
Is there a reason for having 3 separate parts to the form? I may set up a Wizard control to go through each step but this is presuming that the same outline would work and that the trade-offs in using this are OK. If not, controls would be the next logical size as I don't think a complete page is worth adopting here.
While Javscript validation is a good idea, there may be some browsers with JavaScript disabled that should be considered here. Should this be supported? Warned about the form needing Javascript to be supported?
Balance is in the eye of the beholder, and every project is different.
Consider outlining general themes for your project. For example: "We're going to do all form validation client-side." or "We're going to have a 0 refresh policy, meaning all forms will submit via AJAX." etc.
Having themes helps answers questions like the one you posted and keeps future developers looking in the right places for the right code.
When in doubt, try to see your code through the eyes of someone who has never seen it before (or as is often the case, yourself 2 to 3 years down the road), and ask yourself: "Based on the rest of the code, where would i look for this function?"
Personally, I like option number 3, but that's just because it fits best with the project I'm currently working on and I have no need to postback or create additional pages.
I have taken some text field and abd some labels and one submit and one reset button. I want to code like: when i enter some values in text boxes and click upon submit my record will get submitted into the database. And when i click upon reset then my form will get reset.
Please let me know how will i code this scenario.
Thanks,
Ashish
With due respect, this question is rather broad and you would likely be better served by doing a bit of searching for some base knowledge about the tasks that you are looking to perform.
I would suggest that you begin by going to your favorite search engine and querying for:
HTML Forms
Insert data into a database
ASP.NET Tutorials
Once you have a grasp of the basic technologies that you're using, you should find that it is far easier to accomplish your task. If, by chance, you run into any specific problems or issues, then this would be a great place to ask questions related to them. Best of luck.
asp.net and databases
http://www.asp101.com/samples/db_add.asp
resetting the forms
http://www.java2s.com/Code/ASP/Asp-Control/Resettheform.htm
you should try using google first. these examples came up on top for simple queries like
asp.net databases
and
asp.net reset forms
that said you have not really provided enough information to garner a useful answer.
what database are you using, what version of asp.net (are you even using it, or did you click the tag by accident - you
dont mention it in your post), what platform - specifically?
I wonder if someone knows if there is a pre-made solution for this: I have a List on an ASP.net Website, and I want that the User is able to re-sort the list through Drag and Drop. Additionally, I would love to have a second list to which the user can drag items from the first list onto.
So far, I found two solutions:
The ReorderList from the Ajax Control Toolkit, which requires a bit of manual work to make sure changes are persisted into the database, and that does not support drag/drop between lists.
The RadGrid from Telerik which does all I want, but is priced far far beyond my Budget.
Does anyone else have some ideas or at least some keywords/pointers to do further investigation on? Espectially the Drag/Drop between two lists is something I am rather clueless about how to do that in ASP.net.
Target Framework is 3.0 by the way.
The Mootools sortables plugin does just that, and best of all, it's free ;)
http://demos.mootools.net/Sortables
This is just personal opinion, but the problem I find with ready-made controls in cases like this is that they are extremely bloated, because they're trying to fit everybody's purpose. If all you need is a sortable list then a simple Scriptaculous list or jQuery list with a quick WebMethod callback should fit the bill quite nicely, and you can obviously stick this into your own user control.
As I say, just my opinion, but I wouldn't go spending money on something that's going to add tons of overhead to my page, when I could spend (literally) 10 minutes writing one for free.
I've evaluated the Telerik grid as well as Infragistics version. In the end we took an approach similar to what tags2k suggested. We just wrote our own javascript and called .Net PageMethods to do the server side work.
We found both of the "out of the box" solutions to be bloated. Unless you put paging in at like 20 records per row they really stunk performance wise.
Checkout Raj Kaimal's ajax control extender:
http://weblogs.asp.net/rajbk/Contents/Item/Display/517
It works like a charm.