ASP.NET - Drop down value should not repeat in next row

Asked By Revathi Murugesan
09-Feb-12 11:27 PM
Hi,

 I'm Having dropdown in gridview. While doing add row.. My first row drop down value if I select in Second row it should not allow me to select. this validation I want to do in clientside.. using javascript... Please help me on this..

Thanks in Advance.

Revathi.M
  D Company replied to Revathi Murugesan
09-Feb-12 11:32 PM
Hello friend.

do the things as bellow.

1.) get the id of your dropdown control either by document.getElementById("") or by using control.ClintID or use Jquery function $findcontrol("").

2.)well once you god the id of the control, check for the selected value.

3.) now here u can compare the selected value and the current value, if both are same.than ignore it.

4.) one for thing u can do is loop through all the row in grid and find the control inside the grid(your dropdown) and check every time for new value.

5.)same way u have to get the id of dropdown control as u did before(discussed in previous steps)


Hope its clear
D
  Revathi Murugesan replied to D Company
09-Feb-12 11:35 PM
Hi friend...

pls help me with some coding example...
  Revathi Murugesan replied to D Company
09-Feb-12 11:39 PM
Suppose If I'm having five row all dropdown values are unique. While changing the third row value how I have to compare
Create New Account
help
targeting, i.e. even though VS 2008 allowed us to target different versions of the ASP.NET framework 2.0, 3.0 and 3.5, the underlying Common Language Runtime (CLR) for frameworks is the same ( = the .NET CLR 2.0). With the release of the new ASP.NET 4.0 Beta1 framework (that runs on top of the .NET CLR 4.0 that with Visual Studio 2010 Beta1, we now have the ability in Visual Studio to target ASP.NET framework versions spanning multiple versions of the CLR (CLR 2.0 and CLR 4.0). Here is a good tutorial http: / / weblogs.asp.net / scottgu / archive / 2009 / 08 / 27 / multi-targeting-support-vs-2010-and-net-4-series.aspx
Dynamically creating the controls Hi, in vb.net how to dynamically create a dropdown, checkbox and label controls and display the selected items of dropdown and checked text of checkbox. Id also should be dynamic. Also i dont know how many dropdown and checkbox i want, becoz based on the fields the dropdown, checkbox and label should increment automatically. Note: all controls should display in form format, that is, lefthandside label for heading, righthandside their values in dropdown or checkbox. after i selected the dropdown items or checkbox or both, then click on "submit" button, all the labels with the respective selected values of dropdown or checkbox or both should display in table format. pls send the exact coding. Hi Rama, Dynamically creating ASP.NET controls Create a new ASP.NET web application using Visual Studio.NET. It will
fade" class = "black_overlay" > < / div > Now My Problem is- -> when i m selecting any item from drop down list . . which is in first grid view inside of update panel. . . . . . Then i am database its. . . <asp:AsyncPostBackTrigger ControlID = "lnkSave" EventName = "Click" / > This line i try before but my dropdown list is inside of Gridview. . . So its not able to find control. . . . “ASP.NET AJAX / UpdatePanel aren’t working…” – this is probably the number one complaint / question found on the ASP.NET AJAX Forums . I decided it would probably be a good idea to discuss some of described in detail on Scott Guthrie’s blog . < xhtmlConformance mode = ”Legacy” / > will not work with ASP.NET AJAX. The thing that people often miss with this is sometimes this is set in
How to add date picker control I have designed one application form in asp.net.In that field, i have one field Kit_Receive_date.For this field how can i add visual Studio 2008 click on file then New then choose Project. Under web menu choose ASP.NET Server Control and name the project DatePicker. vsgui Now we will change this control inheritance expose command events raised by child controls (within item templates) as top-level events. While ASP.NET server controls in the .NET Framework use event bubbling for command events (events whose event DatePicker.dll and click OK. DatePicker has seen added to your design view. Drag and drop and on your page and start using it :) <SQ:DatePicker ID = "DatePicker1" runat = "server" ImageUrl e.Item.FindControl( "DatePicker2" ); if (e.CommandName = = "Clicked" ) { Response.Write(dtp.Value); } } DatePicker Control in ASP.Net Most often we will get a requirement to capture date input from the users
ANy help will be highly appreciated. Regards, Anish One of the coolest controls in the ASP.NET AJAX is the TabContainer. Recently I had the requirement to show controls in tabs and have the same requirement like you wanted to set focus to a particular tab of ASP.NET Ajax TabContainer control using javascript then read on. Below is the html code for the page having a tab container and some other asp.net controls like the validation control, validator callout etc. <%@ Page Language = "C#" AutoEventWireup = "true" CodeFile = "Default Tab" runat = "server" > < ContentTemplate > < label id = "Label2" runat = "server" > Please select a value from the drop down: < / label > <!- -ASP.NET Drop down control- -> < asp:DropDownList ID = "status" runat = "server" > < asp:ListItem Selected = "True" Text