Telerik RadScheduler - select multiple resources - asp.net

I'm using Telerik scheduler to display a Timeline view of meetings. The resources derive from the Person class, and they are Advocate, and Legislator.
On the Y axis, I am listing Advocates, and on the X axis, I am listing blocks of time in one hour increments.
When I double click an appointment, the Edit Appointment modal dialog pops up and lists Advocates and Legislators.
Since meetings will have multiple advocates and possibly multiple legislators in attendance, I would like to have a checkbox list inside the resource dropdowns on the edit screen. Is there any way to accomplish this?
I believe this will allow me to solve one problem in that, if Peter Pan and Homer Simpson both are to attend the same meeting, clicking the meeting in the row for either of those two advocates will display 'Peter Pan' in both instances (or sometimes '-', not yet sure where that comes from) rather than 'Homer Simpson' where I open up the meeting from his row.
If it is not possible to introduce checkboxes to the resources list, can you suggest an alternate way around the ultimate issue in the above paragraph? Thanks in advance.

Telerik supports the adding of a listbox to support what you are trying to do. On the Scheduler itself add the code below that mimics your field names that your advocates are pulling from in your DB:
<ResourceTypes>
<telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="Adv_AdvocateID"
KeyField="Adv_AdvocateID" Name="Advocate" TextField="Adv_FullName" AllowMultipleValues="true" />
</ResourceTypes>
The next step is to populate the resources using a custom provider. See this program here for a great project in which you can see resource population in action. Using the SchedulerDBProvider class you can then adjust their example to more represent your fields and populate the appointments accordingly with your desired ResourceTypes.

In terms of getting that particular drop down to have multiple selections via checkboxes you would most likely have to define your own custom advanced template. This route allows you to take a UserControl and use that as the edit view for your appointments. There's a demo that displays all of this (including source code) right here.
However, having that RadComboBox there might not even be the ideal approach to take. What about just a simple list of checkboxes? This demo shows off how a very simple declaration for the RadScheduler can achieve this functionality. Additionally, there is some code-behind (both in C# and VB.NET) that shows off how you can customize the text on each appointment, which might be helpful in the case that you're referring to.

Related

.NET dropdownlists with huge number of items

I am working on a webpart which makes use of 5 dropdowns (each dropdown represents 'Project' table columns like projectNo, ProjectPM, ContractNo etc). The table has more than 3000 items, so when the dropdownlists are finally databound, they have more than 3000 items to load, which pretty much brings IE to a halt.
What is the best way to go about architecting a solution, so users can still make use of the dropdown list interface, may be like first rendering an empty dropdownlist and then using a modal window to first find the project number they are looking for and then set the item as selected in the dropdownlist. I am envisioning the following UI. Can anyone guide me on how I should go about solving this issue?
-------------------
|V| [SearchBtn]
-------------------
-------------------
|V| [SearchBtn]
-------------------
-------------------
|V| [SearchBtn]
-------------------
[FindProjectBtn]
Clickikng on the searchBtn basically brings up a popup window where they can search for their stuff, and when they click on the matched result, it will set the dropdownlist.
When working with dropdown lists, a good rule-of-thumb is to keep the list short so you do not experience browser performance issues. If you have thousands of items to look through you can:
Create a search component whereby the user enters a part of the project name they are searching for and display a simple grid for them to choose from.
Implement a type-ahead mechanism. The user enters the first couple of letters of what they are searching for. You can query your DB for the top 10 hits and return them via AJAX.
If you have 3000 items, then definitely drop down list will not be a right designing decision.
using any kind of repeater lists with paging, sorting and searching functions is highly recommended in your case.
but if you insist to have a kind of drop down list view then Matthew's suggestions are your answer.

How to dynamically create the same input fields upon user request (clicking Add More button)?

On the Job Positions page, I would like to have 3 groups of input fields which are static so user can enter Job Name, Job Description, etc. respectively.
I'm not sure what the best approach is but I imagine there would be a button at the bottom which says "Add More". When user clicks on this, it would reveal (say 3) more groups of the input fields. And after entering up to 6 groups, the user can still click "Add More" (perhaps as many times as permissible) to bring up 3 more each time it is clicked.
Hope this is clear enough. I'm slowly getting into the AJAX world.
Thank you.
I would recommend using a framework such as jQuery and use a particular function called append, very easy to do and you'll find the framework simplifying alot of thing for you in the future as well

Best approach for a multi-tab ASP.NET AJAX control?

Looking for some implementation advice:
I have a page that has a 3-tab ajaxToolkit:TabContainer. The purpose of the page is to expose a calculator that has two basic inputs: geo-location and date. The three tabs are labeled "City and State", "Postal Code", and "GPS Coordinates". The layout of each tab container is the same for each tab, with the exception of the location section; the location section changes because each type of location has different inputs. For example, to specify city/state, there will be three fields: city, country, and state (country and state will use cascading drop-down lists). But Postal code requires only one field (which will validate via regular expression for allowed countries).
See the example design mockup:
So, what I WOULD LIKE to do (in order to minimize duplicate code), is to have a common control that contains the layout and structure of the calculator without specifying anything about the location section. Then, I'd like to be able to pull in each of the unique location controls based on what tab is selected. The tab structure exists at the page level, not in a control.
Any advice?
I was looking at templated controls (see MSDN article here), but I'm not convinced that it's the right solution. If I HAVE to create three separate controls with similar layouts and common elements, then that's what I have to do. But REALLY, I'd prefer a more elegant, inheritance-based solution.
Any advice would be greatly appreciated. Thanks.
I wound up using jQuery UI for this. It's tab feature is very nice.

Editing an ASP.NET table control using the Design View in Visual Studio 2008

I have spent a while searching google for an answer to the following question, with no luck.
Does anyone know if there is any way (at all) to use the Design view to edit the contents of an ASP.NET table control (an <asp:Table runat="server">...)?
From all that I can tell, devs are stuck coding their <asp:TableRow>s and <asp:TableCell>s by hand! This is ludicrous, given that you can use the design view as a WYSIWYG editor for standard HTML tables.
In design view go to the properties of your table and select rows and click the button. You can add rows there. Likewise the row properties has a cells property that lets you add cells one at a time.
Still pretty bad but it would cut down on the hand typing.
There is a Rows property you can play with in the design view.
As you add rows to the Rows collection, you have access to the Cell property as well through the dialog presented to you.

Webforms App Layout Opinions?

I have a very simple webforms app that will allow field techs to order parts from the warehouse.
Essentially it work like so:
User selects a category from a filter dropdown, which then binds items of that category to a gridview control
User finds an item in the gridview and inputs a desired quantity (in a text box in a template field in each row)
User repeats 1 & 2 as needed
User sees a summary of the complete requisition
User confirms items and submits the requisition for processing
My no-brainer UI design so far is the generic dropdown-above-a-gridview where there's a category drop-down list that filters a gridview, like in the eye-catching asp.net ado tutorials:
    http://static.asp.net/asp.net/images/dataaccess/15fig01vb.png
Each gridview row (in my app, not in the image above) lists an item's details and can accept a quantity input in the template textbox if the user wants to requisition that item.
Given that a user will want items from different categories during a single usage session, I'm trying to figure out a good, user-friendly way to allow users to input a quantity for an item, have a warm fuzzy feeling that their input has been accepted/stored, then change the category filter (thus binding the gridview to a different set of data) and select other items from the gridview as many times as necessary before summing up their order and submitting it.
I've thought about putting another grid below the first and adding items to it dynamically as the user selects each item. But that seems awkward. Ditto with an unordered list or similar simple structure under the grid.
I've also thought about just storing the user's picks in view state or session state and displaying a summary on another page, kind of like a shopping cart sort of functionality. Maybe do that and use some sort of ajaxy goodness on the main page to display something warm and fuzzy when a quantity is input?
WWYD? What Would You Do?
TIA.
I strongly agree with your first choice: users need to see somewhere what they have chosen or they will probably keep choosing it over again thinking it failed. Waiting to display it on a summary page shouldn't even be an option. I don't see much wrong with binding to another grid, although a repeater is also a decent option. Well, there are many options. Anyway, if there is room to do this off to one side or another - especially the left- I definitely would, rather than at the bottom. Also, bonus points for enabling users to change the quantities (or delete all) of an item they already selected, wherever you choose to display this.
I like the idea of a search, but be careful with auto-complete. Google style is good where it displays results below, but I've seen people develop some that are way too aggressive and love to write over what you're typing: this is awful. Good luck.
Probably because both your choices are fine - it comes down to personal preference. The shopping cart idea is well known. But sometimes it gets old if you have to keep going back and forth between the cart and the item selection.
What's wrong with the separate grid? -That way you keep the selection list separate from the ordered items list?
Why tie the user to selecting the correct category and then selecting the quantity and hitting a button?
Why not use some type of autocomplete search so they can type in the produce name they want? Then a user could type "widg", get a drop town of choices, hit tab to go to a quantity field, enter a number, and then hit enter.
Display a quickie preview with the aucocomplete too, like as single row of your data.
Then throw all these into another grid at the top of the page if its a critical part of the application, maybe at the bottom if you think the actual grid results are important.
The reason I don't like category drop downs is people who are familiar with their jobs or company usually know the names and even skus numebers for what they are trying to do. Having them select a category instead of typing just slows them down. Also I hate running into the "which category is this?" moment. For example, is a chicken a pet, food, livestock, or food producer?

Resources