Search Results

Search found 1524 results on 61 pages for 'dropdown'.

Page 9/61 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • asp.net dropdown list postback to anchor

    - by The Talking Walnut
    How can I go to an anchor tag on the page when the myDropDownList_SelectedIndexChanged() event fires? I am using regular ASP.NET Forms. Update: The following is valid for an ASP.NET Button. I would like to achieve the same functionality (going to #someAnchor) when I select an option from the Dropdown list. <asp:Button ID="btnSubmit" runat="server" Text="Do IT" Width="186px" PostBackUrl="#myAnchor" CausesValidation="false" />

    Read the article

  • Converting Dropdown list to int

    - by ar31an
    hello mates i am trying to store value from dropdown list to an integer but i am getting an exception Input string was not in a correct format. int experienceYears = Convert.ToInt32("DropDownList1.SelectedValue"); please help.

    Read the article

  • how to add a "Please select" to a dropdown box

    - by oo
    i have the following code in an asp.net mvc view. <% = Html.DropDownList("Filter", new SelectList(Model.Items, "Id", "Name", 0), new { @id = "Filter", @class = "autoComplete1" })%> i want to add an element at the top of the dropdown as the first item that says, "Please select". do i have to add that into my Model.Items or is there a way i can add that element into the view and ignore the selection of that first element ??

    Read the article

  • group member dropdown in visual studio 2008

    - by knittl
    in visual studio is the member dropdown, where you can select all members of the current type alphabetically ordered. is there an option which allows grouping of the members? i.e. all constructors before all methods before all properties before all events before all fields? if there is not, bad for me, i guess—it would really enhance productivity

    Read the article

  • ASP.NET dropdown selected value?

    - by Curtis White
    I've an ASP.NET dropdown list and getting selected value by using the .SelectedValue. I also set this value in some cases by assigning to it. I seem to be randomly not getting this value set even when I choose the item from the drop down. Sometimes it works and sometimes it doesn't. Ideas?

    Read the article

  • MS Access Dropdown List/Combo Box

    - by noblethrasher
    This should probably be pretty simple but my Google-Fu is as yet unable to find an answer. I simply want to create a dropdown list in Access so that upon selection I can perform some action based on the value of the selection. For instance, I have a list of people and I would like to populate the combo box so that their names appear in the list but the "value" is set to their ID (the primary key).

    Read the article

  • Dropdown with image and text together in Asp.net 3.5 and jquery

    - by fzshah76
    I've been given a task to make a dynamic drop down which takes it's data[image and value id] from table. I am wondering if any of you came across this scenario or if any one can help me out in this I need help in concept and coding. Definitely any help is appreciated. I see the example in jquery here is the link: http://www.marghoobsuleman.com/jquery-image-dropdown something like this but data is coming from table.

    Read the article

  • MySQL database populated dropdown box and PHP search

    - by Sanel Bajric
    I have question regarding search on webpage with textbox and dropdown box. I have table with fields: ID First name Last name Company name Occupation Description Now i need to make search form which will be populated from database (field Occupation) and textbox where I can put whatever I want, and then get results from database based on those on web page. I am really sorry but i am totally begginer and only need some examples of such kind of code and much help :) Thank you

    Read the article

  • Trying to edit an entity with data from dropdowns in MVC...

    - by user598352
    Hello! I'm having trouble getting my head around sending multiple models to a view in mvc. My problem is the following. Using EF4 I have a table with attributes organised by category. Couldn't post an image :-( [Have a table called attributes (AttributeTitle, AttributeName, CategoryID) connected to a table called Category (CategoryTitle).] What I want to do is be able to edit an attribute entity and have a dropdown of categories to choose from. I tried to make a custom viewmodel public class AttributeViewModel { public AttributeViewModel() { } public Attribute Attribute { get; set; } public IQueryable<Category> AllCategories { get; set; } } But it just ended up being a mess. <div class="editor-field"> <%: Html.DropDownList("Category", new SelectList((IEnumerable)Model.AllCategories, "CategoryID", "CategoryName")) %> </div> I was getting it back to the controller... [HttpPost] public ActionResult Edit(int AttributeID, FormCollection formcollection) { var _attribute = ProfileDB.GetAttribute(AttributeID); int _selcategory = Convert.ToInt32(formcollection["Category"]); _attribute.CategoryID = (int)_selcategory; try { UpdateModel(_attribute); (<---Error here) ProfileDB.SaveChanges(); return RedirectToAction("Index"); } catch (Exception e) { return View(_attribute); } } I've debugged the code and my _attribute looks correct and _attribute.CategoryID = (int)_selcategory updates the model, but then I get the error. Somewhere here I thought that there should be a cleaner way to do this, and that if I could only send two models to the view instead of having to make a custom viewmodel. To sum it up: I want to edit my attribute and have a dropdown of all of the available categories. Any help much appreciated!

    Read the article

  • How to filter using a dropdown in Knockout

    - by user517406
    I have just started using Knockout and I want to filter my data that I am displaying in my UI by selecting an item from a dropdown. I have got so far, but I cannot get the selected value from my dropdown yet, and then after that I need to actually filter the data displayed based upon that value. Here is my code so far : @model Models.Fixture @{ ViewBag.Title = "Fixtures"; Layout = "~/Areas/Development/Views/Shared/_Layout.cshtml"; } @Scripts.Render("~/bundles/jqueryval") <script type="text/javascript" src="@Url.Content("~/Scripts/knockout-2.1.0.js")"></script> <script type="text/javascript"> function FixturesViewModel() { var self = this; var baseUri = '@ViewBag.ApiUrl'; self.fixtures = ko.observableArray(); self.teams = ko.observableArray(); self.update = function (fixture) { $.ajax({ type: "PUT", url: baseUri + '/' + fixture.Id, data: fixture }); }; self.sortByAwayTeamScore = function () { this.fixtures.sort(function(a, b) { return a.AwayTeamScore < b.AwayTeamScore ? -1 : 1; }); }; self.select = function (team) { }; $.getJSON("/api/fixture", self.fixtures); $.getJSON("/api/team", self.teams); } $(document).ready(function () { ko.applyBindings(new FixturesViewModel()); }); </script> <div class="content"> <div> <table><tr><td><select data-bind="options: teams, optionsText: 'TeamName', optionsCaption: 'Select...', optionsValue: 'TeamId', click: $root.select"> </select></td></tr></table> <table class="details ui-widget-content"> <thead> <tr><td>FixtureId</td><td>Season</td><td>Week</td><td>AwayTeam</td><td><a id="header" data-bind='click: sortByAwayTeamScore'>AwayTeamScore</a></td><td>HomeTeam</td><td>HomeTeamScore</td></tr> </thead> <tbody data-bind="foreach: fixtures"> <tr> <td><span data-bind="text: $data.Id"></span></td> <td><span data-bind="text: $data.Season"></span></td> <td><span data-bind="text: $data.Week"></span></td> <td><span data-bind="text: $data.AwayTeamName"></span></td> <td><input type="text" data-bind="value: $data.AwayTeamScore"/></td> <td><span data-bind="text: $data.HomeTeamName"></span></td> <td><input type="text" data-bind="value: $data.HomeTeamScore"/></td> <td><input type="button" value="Update" data-bind="click: $root.update"/></td> </tr> </tbody> </table> </div> </div> Can anybody please advise on this?

    Read the article

  • Disabling Text field with Javascript when value in drop down box is from mysql

    - by SteveJ313
    Hi I have a simple script in HTML, using a dropdown menu. When the value 1 is selected, the user can write in the text field, if value 2 is selected, it disables the text field. However, i changed the values of the dropdown menu, so that one value was from a mysql table(using PHP) and the other remained 'option value='1''. Yet now neither text field is disabled. Below is the code. `<script type="text/javascript"> function findselected() { if (document.form.selmenu.value == <?php echo $id; ?>) { document.form.txtField.disabled=true; // return false; // not sure this line is needed } else { document.form.txtField.disabled=false; // return false; // not sure this line is needed } } ` And the PHP section if(mysql_num_rows($SQL) == 1) { echo "<select name='selmenu' onChange='findselected()'>"; echo "<label>TCA_Subject</label>"; while ($row=mysql_fetch_array($SQL)) { echo "<option value='$id'>$thing</option>"; echo "<option value='2'>Choice 2</option>"; } } echo "<option value=$userid>'Choice 1'</option>"; ?> <option value='2'>Choice 2</option>"; </select> I have tried taking the second option value out of the loop, putting it into html, editing the variable in the javascript function. There is not a fault with the PHP as it is retrieving the right results and displaying it, yet the text field doesnt become disabled. Does anyone know of a possible solution? Thanks

    Read the article

  • Is there a way to handle the dynamic change of a dropdown for a single row in a grid-based datawindo

    - by TomatoSandwich
    Is there a way to handle the dynamic change of a dropdown for a single row in a grid-based datawindow? Example: NAME LIKABILITY PURCHASED IN COLOUR (Text) (DropDown*) (Text) (Text) Bananas [Good] Hands Yellow [Bad] [Bananas are good] Apples [Good] Bags Red [Bad] Given the above is a grid-based datawindow, where the fields 'NAME','PURCHASED IN' and 'COLOUR' are text fields, where as the 'LIKABILITY' field is a dropdown*. I say dropdown* because the same visual representation can be created by using a DropDownList (hardcoded within the datawindow element at design time), or a DropDownDW (or DDDW, a select statement that can be based on other elements in the datawindow). However, there is no way I can get 'Bananas' having it's 3 dropdowns, while Apples has only 2. If I enter multiple rows of 'Bananas', then all rows have 3 dropdowns, but as soon as I add an Apples row, all dropdowns revert to 2 selections. To attempt to achieve this functionality, I have tried the following options: -- 1) dw_1.Object.likability.values("Good~tG/Bad~tB/Bananas are good~tDRWHO") on ue_itemchange when editing NAME. FAILS: edits all instances of LIKABILITY instead of the current row. -- 2) Duplicate Dropdowns, having one filtered, one unfiltered selection list per row, visible based on NAME selection. FAILS: can't set visibility/overlapping columns on grid-based datawindow. (Source) -- 3) Hard-code display value as Database value, or Vice Versa. Have 'GOOD','BAD','BANANASAREGOOD' as the display and database values, and change handling of options from G, B, DRWHO to these new values. FAILS: 3rd option appears for all rows, still selectable on Apple rows, which is wrong. -- 4) DDDW retrieve list of options for dropdown. Create a DDDW that uses the value of NAME to determine what selections it should have for the dropdown. FAILS: edits all instances of the dropdown, not just the current row. -- 5) DDDW retrieve counter of options available (if B then 3 else 2), then have duplicate dropdown columns that protect/unprotect based on DDDW counter. FAILS: Can't autoselect dddw value to populate column to cause protect on other two columns, ugly solution in any case. -- There is now a bounty on this question for anyone who can give me a solution that will enable me to edit a dropdown column for a single row on a grid-based datawindow in PB 10.5

    Read the article

  • Html Attribute for Html.Dropdown

    - by kapil
    I am using a dropdown list as follows. <%=Html.DropDownList("ddl", ViewData["Available"] as SelectList, new { CssClass = "input-config", onchange = "this.form.submit();" })%> On its selection change I am invoking post action. After the post the same page is shown on which this drop down is present. I want to know about the HTML attribute for the drop down which will let me preserve the list selection change. But as of now the list shows its first element after the post. e.g. The dropdoen contains elements like 1,2,3,etc. By default 1 is selected. If I select 2, the post is invoked and the same page is shown again but my selection 2 goes and 1 is selected again. How can preserve the selection? Thanks, Kapil

    Read the article

  • Create UserControl DependencyProperty of which value can be chosen in dropdown list (as combo box)

    - by Viet
    Hello everybody, I'm a starter at WPF, now i would like to make a WPF userControl library which include a Rating bar userControl. All the steps of creating the rating Bar has been done, however i would like to add a property RatingValue: public static readonly DependencyProperty RatingValueProperty = DependencyProperty.Register("RatingValue", typeof(int), typeof(RatingControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(RatingValueChanged))); public int RatingValue { get { return (int)GetValue(RatingValueProperty); } set { SetValue(RatingValueProperty, value); } } private static void RatingValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { //... change the rating value } that the user of my UserControl can modify by a value from 0 to 5 that are shown in a dropdown list (combo box) in the Properties windows (as some exist properties of Usercontrols like Visibility, windows style, background ...) How can i do? Thank you very much in advance, Viet

    Read the article

  • Dropdown menus not showing when i use my wpf application via Remote connections

    - by Bijoy Das Yesudas
    When i connect to my machine using remote desktop the dropdown menus and comboboxes i used in my wpf application is not showing up. And after closing the session when i comes back to my development machine where actually my application runs there also the same issue happens after the remote desktop session. Tried by changing resolution and all sometimes it works but most of the time result is negative. The only temporary solution i found for this is just rebooting the system which is not applicable. Could anyone please help me to fix this issue. Thanks in advance.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >