Web Forms :: Handle Active And Inactive Items In The Dropdownlist?

Aug 23, 2010

It is a general ASP.NET questions. Many times some items in dropdownlist will become inactive (retired)or active again. It is easy to handle in the new records which use only currently active items. But how to handle the inactive items which need to be used to show history records. It bothered me a long time, not sure how to solve this problem efficiently.

View 7 Replies


Similar Messages:

Forms Data Controls :: Show Active/inactive Staff Members?

Nov 11, 2010

I would like to know how to display active and inactive staff members in my datagrid. I would like to be able to have a default setting of the active members with a button or hyperlink saying "display inactive members" and when you click on "display active members" it will show the inactive members with the link saying "active members". There is a column in the Staff table called is_active with 1 or 0 in it.

Here is the aspx code:

[Code]....

[Code]....

View 6 Replies

AJAX :: Change Background Color Of Active And Inactive Tab Panel Header

Feb 27, 2014

I have a tabcontainer with three tabpanel. The first tab is always enabled, while the other two get enabled and disabled in the code-behind depending on some conditions.I would like to customize the header style of the second and third tab such that: - If the tabs are disabled, the header (title of the tab) font color should be gray - If the tabs are disabled, the header (title of the tab) font color should be blue. Currently, I have the following in my style sheet: `a.ajax__tab_tab{ color: blue; }`but this always sets the tab title font color to blue, regardless of whether the tab is enabled or disabled. This piece of code shows the conditions to enable or disable the tabs. Can I control for style here as well?

protected void HorizonTextBox_TextChanged(object sender, EventArgs e)
{
if (HorizonTextBox.Text != "")
{
TabPanel2.Enabled = true;
TabPanel3.Enabled = true;
WholeUpdatePanel.Update();

[Code] .....

View 1 Replies

Web Forms :: Handle Click Events From The Items On The Menu

Dec 11, 2010

I am building for a class I am taking. I am familiar with Win forms, but I am not sure how to duplicate the same behavior in a Web Form. The 1st question I have is: I have a menu on my web form, but I am not sure how handle click events from the items on the menu.

View 3 Replies

Web Forms :: Display All Items In Child DropDownList When ALL Is Selected In Parent DropDownList

Sep 6, 2012

protected void DDLzone1_SelectedIndexChanged(object sender, EventArgs e)
{
BindDistrict();
}

[Code]......

here when i click on ALL item from ddlzone1  it just "ALL" item in ddldistrict

i want when i select "ALL" item from ddlzone1 in ddldistrict14 show all data from database

View 1 Replies

Active Directory/LDAP :: Step Through And Handle Result By Index?

Oct 25, 2010

this is my first post as you will easily see i'm quite new to this and am struggling. i have some working code that pulls user information from our active directory. the only way i've seen so far to display these results is to place it in a "For Each" statement.this can then be output to the page. however if there are lots of results this can take a while, so i was wondering if it was possible to be able to step through and handle the results by an index? here is what i have done so far:

[Code]....

the other issue i have is that i wish to be able to change the search criteria to the "Path" and then go to an idividual when clicked on.i have checked that this would work but cannot get my head around how i would make the result "Clickable" As you can see i have also tried using list boxes but was unable to format the results sufficiently.

View 3 Replies

Web Forms :: Lot Of Items In A Databinded Dropdownlist?

Jan 14, 2010

i have a database table with lot of records > 17000what is the most efficient way to let user to choose between one of the records- 1 dropdownlist with all the 17000 record ?- 1 textbox with autocomplete and a webservice that return the list of the records ?

View 3 Replies

Web Forms :: Set A Hyphen To All Items In Dropdownlist?

Jan 10, 2011

I have a dropdownlist with items. dropdownlist got it from a List<string> object.

Now i want to set a hyphen for all the items. so i looks like this:

- a
- b
- c

Does anyone know a way to do this?

View 5 Replies

Web Forms :: Compare Items Of Two DropDownList

May 7, 2015

how to count the common data from two dropdownlist control.ex..

1st dropdownlist have 1 2 3 4 

2 nd dropdownlist have 3 4 5 

so the count of common value is 2 (3 4)..how to calculate this.

View 1 Replies

Web Forms :: Group Items In DropDownList

Jan 24, 2016

Category and Sub Category in single Drop Down List DDL example with showing subcategory inside Main Category...

View 1 Replies

Forms Data Controls :: How To Add New Items From Dropdownlist

Nov 18, 2010

I have a dropdownlist which get item from database (say this field has 10 records for this dropdown list.

I want the users are not restricted to these 10 items. What is the quickest way to do so the user can type in new values and insert into database ?

View 4 Replies

Web Forms :: Disable And Highlight Certain Items In DropDownList?

Aug 12, 2010

I would like to highlight (bold) and disable certain items in the dropdownlist for selection.

My dropdownlist is fed from a SQL table of countries e.g.

Europe
-UK
-FR
-DE
-AU

I need to heading "Europe" to be not selectable? the database has a column (selectable = 0) for those heading and I need to make them not selectable on the client side.

View 9 Replies

Web Forms :: How To Get List Of VALUES (not Items) From A Dropdownlist

Oct 11, 2010

I see that dropdownlist has an "items" property to get the list of displayed items for a dropdown, but it doesn't seem to have an equivalent property for getting the "values" associated with the items. For example, I may have a dropdown that displays "High", "Medium" and "Low", but returns values of "H", "M", "L". How can I easily get that list of HML?

View 5 Replies

Web Forms :: Change Items In DropDownList In Code Behind?

Dec 3, 2010

I have two DropDownLists; DropDownListStart displays the hours 09:00 - 19:00 and DropDownListStop displays 10:00 - 20:00. When the user chooses one of the hours in DropDownListStart I want the program to adjust what's shown in DropDownListStop so that the first hour shown is one hour after the hour chosen in DropDownListStart. How can I do that in code behind (c#)? An example: if the user choses 13:00 in DropDownListStart I want DropDownListStop to display only 14:00, 15:00, 16:00, 17:00, 18:00, 19:00, 20:00.

View 12 Replies

Web Forms :: Add Tooltip To Dropdownlist Items Runtime?

Feb 9, 2010

Is it possible to add tooltip on dropdownlist items?

If yes, I want to implement something as below:

While loading dropdownlist I have...(in c#)

Dropdown.DatavalueField = "request_Category_ID";
Dropdown.DataTextField = "request_Category_Name";

Now, I want to add request_Category_Description as a tooltip on each items in Dropdownlist.

View 4 Replies

Web Forms :: Maximum Number Of Items In Dropdownlist?

Oct 29, 2010

I've created a dropdownlist that pulls from a SQL table with 241 rows. For some reason, the list only shows 168 rows? What am I doing wrong?

View 4 Replies

Web Forms :: Provide Tooltips For Dropdownlist Items?

Mar 9, 2011

i need to provide tooltips for dropdownlist items,

so how to provide tooltips for ddl items,

View 2 Replies

Web Forms :: Failed To Delete All Items In A DropDownList?

Jan 28, 2010

a DropDownList bound to a table

[Code]....

[Code]....

[Code]....

when I delete all records from the table it display this error messageon the line ddlIdOCRQ.DataBind()"Argument Out Range Exception was unhandled by user code""'ddlIdOCRQ' has a SelectedIndex which is invalid because it does not exist in the list of items.

View 3 Replies

Web Forms :: Remove Duplicate Items From DropDownList

Jun 28, 2012

I would like to know, how to make sure, item with same name do not appeares 2x in the dropdownlist item? 

View 1 Replies

Web Forms :: Cannot Have Multiple Items Selected In A DropDownList

May 7, 2015

System.Web.HttpException: Cannot have multiple items selected in a DropDownList.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Cannot have multiple items selected in a DropDownList.

I have a nested gridview and inisde a child grid there are several columns having dropdown and one add button. when add button is click a new row inside a child grid is created with an empty dataand previous row data have been saved in viewstate so that it can be bind wen add button is click to create new rows.My code is working fine when i dont select any dropdown list item and new row is also created but wen i select items from dropdown and click on add more button i get above error.

When add button is click

protected void ButtonAdd_Click(object sender, EventArgs e) {
Button gv = ((sender) as Button);
string[] ParentIdArray = gv.ClientID.ToString().Split('_');
int ParentId = int.Parse(ParentIdArray[1].ToString().Replace("ctl", "").Trim()) - 2;
int RecordCount = ((GridView)GVMain.Rows[ParentId].FindControl("grdAddHotel")).Rows.Count;

DataTable dtAddHotel = new DataTable();
dtAddHotel.Columns.Add("CostSheetId");

[Code] .....

View 1 Replies

Web Forms :: How To Find Items In DropDownList By Text

May 7, 2015

i have a dropdown binded from database ;

now datavalue is INT

and datatext is string in my dropdown

now lets say in my dropdown the sequence is like this :

Value   |    Name
1             Pakistan
2             Saudia

now i have a string ;

string a = "Saudia";

now i want to know the DropDownsItemValue with respect to this string ....

View 1 Replies

Web Forms :: Make Aspx Page Inactive After We Redirecting Once?

Jan 3, 2011

i had aspx page control for transferring the application datas to another web page. k when i click the transfer button. the Current page will be inactive. and the User only once time they can transfer the page otherwise disabled.

View 3 Replies

Web Forms :: Logic Behing Counting Dropdownlist Items?

Aug 12, 2010

I have a bounded dropdownlist. there may be many items in dropdownlist, i dont know how manty they will be depending on some conditions.suppose there are N items are bounded in this dropdownlist let say

A
B
C
D
E
.
.
.
.
.
N

and I am also doing that if i select A and click add button then it'll be added in a gridview, then i selectB and click add button the B will be added to the gridview.. and so on.I want make it restricted like if i again select A and click add button then it should not be added to the grid view and show msgs thatA is already in the gridview. and if I delete A from gridview that and select A again and click add button the A should be add to the gridview.just let me know the logic with explanation.

View 10 Replies

Forms Data Controls :: Check If Dropdownlist Has Any Items?

Nov 18, 2010

I have a DropDownList with a list of orders. When an order is selected from the list I generate a GridView with details of that order. Within the GridView I call other databound controls and all works fine until I finish the orders in the DropDownList

I have tried to enclose the code within a if dropdownlist.items isnot nothing end if but it makes no difference

This is the code:

Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound
If DropDownList1.Items IsNot Nothing Then
GridView1.SelectedIndex = 0 [code]...

View 2 Replies

Web Forms :: Getting Error / Cannot Have Multiple Items Selected In A DropDownList

May 29, 2010

Below is my code. I am getting error "Cannot have multiple items selected in a DropDownList"

if i run this code.lstType.Items.Clear()

strSql = ""
lstType.DataSource = handler.fnDataSet(strSql)
lstType.DataBind() [code]....

View 12 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved