.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
Jean Paul
SP
satyapriyanayak
Ashutosh Jha
Post New Web Links

Create a placeholder for drop down lists

Posted By:      Posted Date: August 25, 2010    Points: 0   Category :ASP.Net
 

First time post here, if i'm in the wrong area please move as necessary. Thanks

I'm using VWD with a database back end. I have a list of teams which are marked off by league, level, division, teamid and then using gridview for the list of players per teams.


I've got the drop downs working correctly but running into a little snag and that is on the auto postback.

When I only have one option come up in a list, i obviously don't change that list and thus it doesn't change the next drop down because there is no post back. is there a way to use a "header" value?

Example of my data

League Level Division Team

NHL 1 West Vancouver
NHL 1 West Calgary
NHL 1 West Edmonton
NHL 1 Central Chicago

OHL 2 West London
OHL 2 West Guelph

NBA 1 Central Chicago
NBA 1 Central Detroit
NBA 1 Central Milwaukee

So my drop downs choose by league, then level then division and then team then shows the player roster for that selected team.

The problem I run into is when only one value exists based on the previous choices I've made. If I choose NHL then Central only Chicago shows up in the example above. Because I'm not choosing between it and another value, the drop down does not put in a post back and thus I don't get a list of the team and then the players


View Complete Post


More Related Resource Links

Quick Note: Create Lists with Custom Content Types in SharePoint 2010

  
Learn how to create a list in SharePoint Server 2010 and associate it with a new content type. Next, you disassociate the list from the content type and then delete the list.

how do i develop a cascade drop down lists which get the chart names from excel sheets

  
hi i have to develop a cascade dropdownlist. one of the drop down is used to retrive only excel docs from a specific doc library and and the other drop down to get all the chart names and attach it to the second dropdown list in doc lib item changed event thanks    

Create drop-down filter for External List

  
I hope this is an easy question. I will have an external list of a bunch of people.  There are several ways I want to display this data: All of them, Only the ones that have a value of 1-4 in the status field, Only the ones that have any other value in the status field, and people that have a value of 1-4 in the status field, but are at a certain location. I want to be able to put a drop-down filter above the list where people can select that. Could someone please point me in the right direction? Time is of the essence.  

Dynamically Drop and Create tables, overcoming 4000 charachter limit

  
We have a Navision SQL-server database for 7 companies. Each table starts with the name of the company. Except for the CompanyName-part, the tables names are equal. I made a Foreach loop that dynamically transfers tables/data from the the Navision-database to a staging-database. I also want to Drop and re-Create the tables dynamically. However, if I try to do that via an expression in a SQL Task, SSIS complains about the 4000 character limit. What is a better way to do this? I want to execute SQL-commands and have SSIS replace part of the tablename with the contents of a variable (being the name of one the 7 companies). I have no access to the Management Studio or the DB so I need it to be done within the package. What is the best way to do that?

Create report that lists every user with permissions for each folder

  
I would like to have a report that will list each user with it's roles for every folder. We have a very large RS database with a lot of folders, we need some better way to keep track of permissions. I created a report that utilizes "GetPolicies" from http://localhost/reportserver/ReportService2005.asmx but I have to feed a folder name to get list of users. I can also (by using subreport) list all folders with users. However, I am not able to produce a report where I have it broken by user. any idea?

help with drop down lists

  
Hello i have 4 ddl for factory, category, model and engine im tryin to make connection between them so i could select factory and then the other ddls will change the data that relative to the select item on factory. I know how to make connection between them but i need to use AppendDataBoundItems so the user could select "all models" or "All categories" without success!!! when i select factory the category get the models and when i select different factory the new model join the other factory models and so on and on. i was try with ajax cascading ddl but i didnt success cause the user need to have the change to select factory and engine (for example) but the engine is enabled = false until the user select 3th ddl PLEASE HELP

Create a picture that can be marked by the user using drag and drop

  
I am trying to see if it's possible for me to have a picture like of a car and have it to where users are able to take a symbol and mark up the diagram with it.  Without needing a template pen.  Thanks for any help and advice.

Creating a generic template writer that can handle drop downs and option lists

  

If I have a the following model

public class User
	{
		public List<Company> Companies;
					
		[Required]
		[DisplayName("Login")]
		public string Login { get; set; }

		[Required]
		[DisplayName("First Name")]
		public string FirstName { get; set; }

		[Required]
		[DisplayName("Last Name")]
		public string LastName { get; set; }

		[Required]
		[DisplayName("Password")]
		public string Password { get; set; }

		[Required]
		[DisplayName("Company")]
		private int Company { get; set; }
	}

And the following generic control template writer (which would have to be extended appropriately)

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<% foreach (var prop in ViewData.ModelMetadata.Properties .Where(pm => pm.ShowForEdit && !ViewData.TemplateInfo.Visited(pm))) 
{ %>
	<div class="SD_FieldItem">
		<% if (!String.IsNullOrEmpty(Html.Label(prop.PropertyName).ToHtmlString()))
		{ 
			switch (prop.ModelType.Name)
			{
				case "Boolean":

					%>
						<div class="SD_BoolField">
							<%= Html.CheckBox(prop.PropertyName) %>
							<%= Html.Label(prop.PropertyName) %>
							<%= Html.ValidationMessage(prop.PropertyName, 

Unable to create lists in upgraded web application

  

I can no longer create lists, sub webs or document libraries in a web application that I have upgraded from sharepoint 2007 to 2010. I dont think its directly related to the upgrade since it did work at some point.


When trying to create the list using addgallery.aspx the silverlight application will simply say that an unhandled exception has occurred with no further info.

 

In the log I have the following related log messages:

 

1)

Entering monitored scope (Request (POST:http://sharepoint2010:80/profil/_layouts/AddGallery.aspx))

 

2)

Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:   

 at Microsoft.SharePoint.SPWeb.get_ListTemplates()    

 at Microsoft.SharePoint.Solutions.AddGallery.AddGalleryWebPart.GetListTemplates(XmlWriter myXML, SPSite site, SPWeb web)    

 at Microsoft.SharePoint.Solutions.AddGallery.AddGalleryWebPart.GenerateItemXML(XmlWriter myXML)    

 at Microsoft.SharePoint.Solutions.AddGallery.AddGalleryWebPart.RenderControl(HtmlTextWriter writer)    

 at Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter

Sharepoint Foundation - Create and deploy custom edit/view forms for external lists

  

Firstly, we are using sharepoint foundation so Infopath forms are not an option for us.

We have a Visual Studio sharepoint project which deploys a complete sharepoint site. The site contains a number of external lists and we want to be able to create customised view/edit forms for these lists and add them to our Visual Studio project so they can be deployed as part of the new site. The idea is that we can deploy the solution to a fresh site with a default set of forms which can then be customised for different implementations of the site.

Here's the steps we have been using to try and do this:

1. Deploy the base project (BDC) to the sharepoint site

2. Create external lists based on the BDC content types

3. Use Sharepoint Designer to create new edit/view forms for the lists and set these as the default forms for the list

3. Save the site as a template

4. Import the template into a new Visual Studio project and select the lists we require. This gives us a List Definition, a pages module (with element file), an elements file and a schema file (both for the List Instance).

5. We then add the contents of the imported project to our main solution as follows:

  • Create a new List Definition (including List Instance)
  • Copy the contents of the imported Elements.xml to the Elements file for our List Instance.

cascading drop down lists from single table

  

my one table consists of fields (id, flying from, flying to). thus i have one drop down for flying from and another drop down for flying to. i'm hoping to cascade them so 2nd drop down values are dependant on the values from 1st drop down. is it possible to do this using a single table? or must i use two tables and link the id's from both? and do i write anyting in the SelectedIndexChange event? thanks...

the sqldatasource code looks like this:

Flying From:

        <asp:DropDownList ID="ddlFlyingFrom" runat="server" DataSourceID="SqlDataSource1"
            DataTextField="FlyingFrom" DataValueField="Id" AutoPostBack="True" OnSelectedIndexChanged="ddlFlyingFrom_SelectedIndexChanged">
        </asp:DropDownList>

        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>"
            SelectCommand="SELECT [Id], [FlyingFrom] FROM [Flights]"></asp:SqlDataSource>
      &nb

pass a value to the 2 Master/Detailed drop down lists

  

using below code, I bind 2 drop down lists.


    <asp:SqlDataSource ID="sdsCountry" runat="server" ConnectionString="<%$ ConnectionStrings:Conn %>"
        SelectCommand="SELECT tbz_CountryID, tbz_CountryName FROM AZ_Country"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsCity" runat="server" ConnectionString="<%$ ConnectionStrings:Conn %>"
        SelectCommand="SELECT [tbz_CityID], [tbz_CityName] FROM [AZ_City] WHERE ([tbz_CityID] = @tbz_CityID)">
        <SelectParameters>
            <asp:ControlParameter ControlID="ddlCounty" Name="tbz_CountryID" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

And using the below code, I pass the content of GridView selectedRow cell to that DopDownLists .

 Protected Sub gvTax_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
      With gvTax.SelectedRow ddlCountry.SelectedValue = .Cells(26).Text Try ddlCity.SelectedValue = .Cells(28).Text Catch End Try End With End S

.NET Interface to Create/Maintain Custom Lists in SSAS

  

I would like to create a .NET interface to Create and Maintain Custom Lists in SSAS Cubes.  Would anyone know if there are any source code projects going in this direction?? If not, some direction on how to accomplish this?  Anyone have existing code/samples to.. Ex. Create lists from MDX scripts wrapped in Stored procedures 

Any help would be greatly appreciated

Thanks..


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend