Posts

Showing posts from February, 2015

Bold and underline dropdown list menu item asp.net

Here is the code private void createDDLCategory () { ddlCategory . AppendDataBoundItems = true ; ddlCategory . Items . Insert ( 0 , new ListItem ( "All" , "A" )); ddlCategory . SelectedIndex = 0 ; var ddl1 = dropdownlist . ddlCategoryWithoutGroup (); foreach ( var value in ddl1 ) { if ( value . P_CATEGORY_ID == null ) { this . ddlCategory . Items . Add ( new ListItem ( value . CATEGORY_NAME , value . CATEGORY_ID . ToString ())); this . ddlCategory . Items . FindByValue ( value . CATEGORY_ID . ToString ()). Selected = false ; this . ddlCategory . Items . FindByValue ( value . CATEGORY_ID . ToString ()). Attributes . Add ( "disabled" , "true" ); this . ddlCategory . Items . FindByValue ( value . CATEGORY_ID . ToString ()). Attributes . Add ( "style" , &quo