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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

disable a single intem in dropdownlist or stop the ddl change event for a single item

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

hello guys,

I am trying something apart of my boundries, is there any way to disable a single intem in dropdownlist or stop the ddl change event for a single item.

any feadback would be appriciable.

Thanks and Regards

Inderjeet Singh Khalsa

View Complete Post

More Related Resource Links

Sharepoint and IIS/Windows Event Logs in a single view

Hi - I'm coinsidering addng sharepoint log reading capabilities into an application I've built for reading windows and IIS logs (for more info http://logenvy.com). I know there are quite a few applications capable of reading sharepoint logs (a number are listed here http://stackoverflow.com/questions/781179/sharepoint-2007-log-viewer). Does anyone think the capability to analyse windows and IIS logs alongside sharepoint logs would be useful, or have any logging requirements not well met by the current set of tools? I'm especially keen to explore useful/interesting data visualizations on top of data logs.

Item grouping and lot no on a single line

I would like to have the items group in a single row, that is not to complicated, however, each items has a lot number (serial) and in the column near the item number, I would like to see these serial number one after the other, on a single line, separated by a comma.à If a customer order a quantity of 2 of a specific item, the software I use create 2 lines because of the serial number attached to it, and on the quantity column it write 2 times 2 so my invoice is out of balance, this is because of the serial number. Example: Item                 Description          Quantity             Serial number 1234                 Item 1234                 2                   50012 1234                 Item 1234                 2           

How to Capture a DropDownList Selected Index Change Event

I have a gridview that receives data based on selection from a primary dropdownlist object. Works. Within the gridview, there is a dropdownlist whose selected index is based on the query from the primary dropdownlist. Works. Problem. How do I force the used to  change whatever value that the dropdownlist contains after they make their initial selection from the primary dropdownlist; except the default value of "Please make a selection". Gridview, contains a checkbox which drives whether a selected row is inserted into the data base. The databind in done using an ObjectDataSource on the presentation page, not in the code behind.   Thank you.   Ayomide 

How to display TreeViewItems different ways based on the item type under a single node?

Hi, I am having trouble trying to display hiearchical data under each node in two different ways depending on the data.  I hope someone will be able to provide me some help on this since I am rather new to WPF development. Maybe I am going about this all wrong but for now, I am trying to create a customized TreeView to represent data similar to the xml I provided in the code below.  The <ItemsPresenter/> instances listed in the code are not exactly doing what I need.  I will probably need to filter the content that I list with each of the two <ItemsPresenter/> tags based on the type of each item although I have no idea if this is possible.   <Window x:Class="Wpf_treeview_testing.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <!-- * The "xmlData" describe roughly the type of data that I require visual representaion of. * Since I could not find a WPF Control that will present a Hierachical Data Template close to what we need, I am trying to setup a TreeView to represent this information by using a ControlTemplate for TreeViewItem. * The preferred result is to present different items types in

Error when change single column collation


I try to change a collation on column FirstName on table Person. Then I got following error:

Msg 5074, Level 16, State 1, Line 1
The index 'IX_...' is dependent on column 'FirstName'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN FirstName failed because one or more objects access this column.

So should I drop the index before the change and create it again after the change? Any other possible impact on existing data for such kind of change?

WSS 3 - How do I retrieve a single item from the Web Services?


This is kinda two questions but they are related.

I have successfully used the GetListItems method of the Lists web service to get the items in a list.

Having looked around I can't find the expected easy way to:

1. Get a single list item by ID.  Do I just use GetListItems and use ID in the Query?

2. Get a document from a document library.  The answer might be the same: use GetListItems and use ID in the Query and somehow transfrom the document body into a stream?

Having used CRM web services I was expecting to see GetListItem(ID) and perhaps GetDocument(ID).

Can anyone point me at an example/tutorial or provide a sample.


Is there a way to disable the Open in Windows Explorer option for a single document library (SP2010)

I am looking to disable the Open in Windows Explorer option for a single document library (SP2010). Can someone help me with this?

dropdownlist item onmouseover event?


Hi friends,

my project needs for when i focus mouse pointer on items in dropdownlist display a some information in div related to focused item. 

Plz help me...

gridview dropdownlist selected indeex change event



I bind the ddl as name column in gridview and age as textbox in the next column.

 void bind()


 SqlCommand com = new SqlCommand("Select id,name from employee", con);

SqlDataAdapter da = new SqlDataAdapter(com);

DataSet ds = new DataSet();


GridView1.DataSource = ds;


SqlDataAdapter da1 = new SqlDataAdapter("select id,name from employee", con);

DataSet ds1 = new DataSet();


for (int i = 0; i < GridView1.Rows.Count; i++)


 DropDownList ddl = (DropDownList)GridView1.Rows[i].FindControl("ddlname");

ddl.DataTextField = "Name";

 ddl.DataValueField = "Id";

ddl .DataSource = ds;




the above coding i fallow but in selelected indexchange event i have to dispaly the age of particular name in gridview.

View for a single list item?


I have a SharePoint 2010 list that manages work orders, but I can't find a way to create a view that shows only one record in a receipt-like format.  I have seen that there is the capability to use XSLT to create custom views, but I can't see where I would upload/edit this in SharePoint Designer (I have Visual Studio, but haven't started using it yet for SharePoint development)

Here is an example of what I want to do...

Fields in the List:

Date | Customer Name | Description | Quote

I'd like to print out a receipt that looks like this:

Date: 10/15/2010
Customer Name: Joe Smith
Description: Level 1 Tune-Up
Quote: $200

I'm assuming that a View (which can be printed) would be the easiest way to do this, and that a custom Web Part would be the best but also a lot more work.

Update Single item with EntityFramework


I want to update object via entity framework

For example I have to changed object


I want to save change to the Obj1 Only

   public void Edit(Company _Company)
            //_context.ApplyPropertyChanges("Company", _Company);

I try to Save with ApplyPropertyChanges but the data didn't saved

How can I update object?


The number of calls to the Changed event for a single update in the data exceeded the maximum limit.


Dear All,

We have hit the big limit of 16 change events per single update.  Is there any way to extend this to say 25, we are not using infinate loops or anything.

Alternatively, is it possible to disable some change events when values are updated?


William Man

Multiple Event Receivers For Single List



I've developed a custom event receiver that fires of the ItemUpdated event for a list. While this code works fine in our dev environment, it appears to not function correctly in production. I have been told that there's another event receiver that also fires on the ItemUpdated event for the same list.

 From the behavior I have seen, it would appear the the two event receivers are "colliding" with one other. Is there anything that I can do to work around this problem? Is there a way to specify an order that the receivers are fired or some other way to prevent them from stepping on each other?

change the column type from single line of text to choice



I have created a calendar & there is an inbuilt column location that is single line of text, I want to change from single line of text to choice, but i don't see the option & I am not able to delete the Location column. is there any way to delete the column or change the type from single line of text to choice.


Thanks in advance  

Change data type of library field from Single Line Text to currency


I have an InfoPath 2010 form that has a field listing the amount of currency on a meter. It is a Decimal form in Infopath but publishes to SharePoint as a Single Line of Text.  It will not let me modify the column in SharePoint and it will not let me select the allow edit from the Publishing Wizard.  I need the column as a currency so my Excel Queries work.



Display single item from List using XSLT and show total count of all items in list


I have a simple SharePoint 2010 list named "Tips". Each item consists of a Title and Description. I want to display a single item at a time in a sidebar on my site with arrows to advance to the next or previous item in the list. I've been able to accomplish this pretty easily using OOTB SharePoint XSLT list view web part settings and AJAX. However, when I tell the web part to only display 1 item at a time the pager always says it's showing item "1 of 1" or "2 of 2". It won't show the total number of items from the list. I'd like it to show something like item "1 of 25", etc. How do I get it to display the total count of items from the list?  I've looked at possibly using aggregation attributes on a FieldRef but I've not been able to get anything to work. I'm not even sure that's the right place to be looking. I'm needing to accomplish this without writing a custom web part. 


Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.
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