I have a gridview where i have two fields. one is product and second is sub category.
I need to do 2 things.
1. I need to populate the two combos from the database. But depending what is selected in dropdown 1 this will determine what needs to be populated in drop down 2?
I am a complete newcomer to ASP.NET. However in the few weeks I have been playing with it I have got pretty far and have mastered things like stored procedures, gridviews, formviews and templates.I have a dropdown box which is populated from SQLDataSource1
I have a second dropdown box which is populated from SQLDataSource2, but i need the query feeding this to be dependent on what was selected in the first dropdown box. I assumed it would simply be a case of modifying the select statement on SQLDataSource2 using the SelectedIndexChanged event on the first DropDownList to update the second SQL source, but I cannot work out for the life of me how to do it. Pretty much all of the code I have is ASP.
can i do this purely in ASP rather than using VB behind the scenes or do I need to use VB? I am pretty comfortable with vb.net but one of the other issues I have is referencing an ASP object from VB... so for instance if I had a text box in ASP, how can I read or change the properties of this object from VB?
I have dropdown1 that has some items in it.I also have dropdown2 that gets populated from a database based on whatever is selected from dropdown1.Dropdown2 has its first item as "Make Selection" and then appends the data from the db based on what was selected in dropdown1.
Now when I select an item from dropdown1 it puts the correct data in dropdown2 but as soon as I select another item from dropdown1 it appends those values into dropdown2. How can I remove the values from dropdown2 after a new item is selected from dropdown1?
I have an self-referencing entity which maintains a list of like entities that are it's children. What I need to do is build a dropdown that lists all possible parents so when I add or edit a new entity of that type, I can select it's parent (or no parent). The problem lies in the sql. I simply don't know how to word it.
IList<ParentForumModel> parentForums = new List<ParentForumsModel>(); foreach (Forum forum in forumRepository.GetAll()) { // not sure how to handle this here because it isn't in the correct order. I need them to be grouped by parent and sorted by the sequence field. It also needs to be a flat dataset, not something uses IGroupedQueryable or some such. } ForumAddModel model = new ForumAddModel { ParentForums = parentForums, // other properties }
public IQueryable<Forum> GetAll() { return context.Forums.??? // what Linq do I need here? }
If this simply isn't possible with Linq2Sql, then is there a system where it is possible? Please don't say hnibernate.
I have a category and a subcategory column in a Jqgrid. I have enabled inline editing, both category and subcategory are dropdownlists columns (edittype:'select'). I need to filter the subcategory list based on the selected category. I wonder how can I acheive this functionlity? I tried the below event but its not working for me
afterEditCell: function(rowid, celname, value, iRow, iCol) { //to do here }
the above event doesn't get fired. my all column are editable
How can i check a parameter value and add onto or remove conditions from my where statement.Here is what i mean.. i have a stored procedure that is being used for returning small set of fields based on a parameter that it is expecting. Since the only difference between the select statements are the last AND condition, i was wondering if i can check that parameter as im doing now but change that AND condition so that i have only 1 select statement instead of 3 within my procedure.Current Example:
how to populate a dropdown list box based on selected value in another.
dropdown list box? Say, for example, the first dropdown is a list of car manufactures. When a user selected a manufacture from that dropdown list, the second dropdown would list would automatically gets populated with all the car models for that manufacture.
I am new to MVC, I have a form in which selection of one dropdown should reload another dropdown. On selection of the dropdown, I use a jquery post to get the data and my viewstate is reloaded with new data, but I am not sure how to set the newly loaded viewdata to load the dropdown again.
1) I'm currently working for HR application with security roles
2) for that I created dynamic menu and set data source to sitemapprovider control with "AspNetSqlSiteMapProvider"
Now my client requirement is to change menu's based on drop down selection so that menus will be minimum and quite user friendly.for that I did following steps:-
Created Drop Down contains list of all Roles provided him in Master Page In Menu1_MenuItemDataBound event I grabbed the roles for that node and compared with role selected in drop down and deleted that node now what i need is on drop down_selected index change I want to recreate menu.
i have over 100 items all loaded in a dropdown list. They all are assigned a value between 1-10 which represent 10 categories. When certain buttons are clicked, i want the dropdown list to display only items with a value "1" or "2", etc.
I am trying to preselect an item in a drop down list box based upon a value I pass in from a data reader. When I place a "Watch" on the drop down list box, the code I am listing below says that it does what it is supposed to and sets the "selected item" to the one I want BUT when the page is rendered and comes up the first item is always selected. It is like it loses the set when the page is loaded or something.
Here is the code.... <td style="width:33%"><asp:Label CssClass="formlabel" ID="lblRU" runat="server" Text="Reporting Unit: "> </asp:Label> <asp:DropDownList ID="ddlRepUnitTeam" runat="server" DataSourceID="SqlDataSource1" DataValueField="MR_LU_TEAMS_PK" DataTextField="MR_LU_TEAMS_NAME"> </asp:DropDownList> </td> <% For Each item As ListItem In ddlRepUnitTeam.Items If item.Text = myReader.GetString(0) Then ' ddlRepUnitTeam.Visible = False item.Selected = True Exit For End If Next %>
For giggles, I add the ".Visible = False" in there as a test and commented it out later. That doesnt work either. The item still is visible. I know the IF statement passes as it enters into the if statement using debug mode and hits the "Exit For" so I know the condition is being met. I am at a loss over this one.
I am trying to display results based on both dropdown list selection.If a user selects Jan from 1st ddl and 2013 from 2ns ddl then results of Jan 2013 will be displayed to the user,everything works fine,I wanted to confirm the query that I have used is correct or not.
Store Procedure
Create proc usp_monthwisedata @month int, @year int
[Code].....
My concerns are:
1.Is the way of writing the Sp is correct to achieve the result.
2.Is it correct to set the onselectedindexchanged of both the ddls to 1 method i.e onselectedindexchanged="DropDownList1_SelectedIndexChanged"
Now, based on user selection say, 'Car', I want to display Help text associated with selection on page. Help text description - 1000 characters. Now, how do I fetch Help Text Description from? should I store in Session scope or Application Scope or fetch from Database based on drop down selection.
i have an asp.net application, i want to incorporate init the functionality of having the user select from a dropdown list a name, select multiple files (images), upload those images to a physical path on a server, save the image paths to a database on the said server.
If the user fails to select a name from the dropdown list then the user would receive an alert message stating that a name must be selected.
In addition once the files have been successfully saved to the server's physical location, then and only then should the path be uploaded to a table in the database.
Based on Checkbox click radiobuttonlist controls are enabled/disabled.
for some reason i cannot set the focus on to 2nd item with in the list item.
Checkbox (autpostback property as true).
on checkchanged event i have the following code
[Code]....
This code sets focus only to the first listitem and when user hits tab focus is set to next checkbox but what i need is after focus from firstlistitem set focus to secondlistitem.
I have a textbox in a formview as well as a dropdown. When I select a value in the dropdown, the textbox should be made visible or invisible based on the value I select.
I have a drop down that lists all our 40+ locations.. I then have a list box with all our locations as well. The client is presented with the question which locations have you worked at before. If they pick say 3 locations, i need to remove or disable those 3 from the drop down. I have other code for creating a drop down, but not sure where to go with this.
I'm having trouble figuring out how to display a gridview based on the selection of a drop down list. I manually entered the drop down list items, but in the configure/choose data source I don't understand how you make a relationship between each list item and the corresponding database table you want to show.
I need to get a dropdownlist itemlist to expand in MSIE. The width of the dropdownlist control is set to a fixed width and it cannot be altered onclick, so I need to have the list of items that drops down when clicking autoexpand widthwise. I have tried several different jquery options that are out there, but they are not stable because they do not work on every click and sometimes forces the user to click twice for the itemlist to appear. Displaying a tooltip is not enough, I need to see the list expanded.
The list should look like this;
**DROPDOWNLISTCONTROL**
**LONG CONTENT THAT STRETCHES WHEN EXPANDED**
The list currently look like this in MSIE, and I cannot expand the dropdownlistcontrol,
**DROPDOWNLISTCONTROL**
**LONG CONTENT THAT STR**
Is there anyone who knows of a smart way to do this?
i want to see the sales in the grid view based on the month selected from drop down list. Ex: when I select June 2010 from the ddl box, the sales for that month are correctly displayed in the grid view. I go to page 4 to look at some sales there and then switch the month to August 2010 to see sales for that month instead. Here is the problem. When I switch the month, it show August 2010 sales, but stays in page 4 instead of going back/resetting back to page 1 of August 2010 sales.
How do I reset the grid view page back to the first page of August 2010 sales?
I am fairly new to ASP. If I have missed an imp. detail in this post, let me know and I will get that info. out there.