473,761 Members | 7,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I raise an OnSelectedIndex Changed for an DropDownList in the footer of a DataGrid?

Hi!

In a DataGrid I have a 'Add New'-field in the footer. I want to hide an
control (txtNewFe_name) if the value of cmbNewFe_num is >0. How do I do
that? The OnSelectedIndex Changed does not seem to response to anything, even
though I tryed with just:

Function CheckFe_num()
Response.Write( "Hello World!")
End Function

Best regards / Bengt-Erik

MyPage.aspx
........
........
<FooterTemplate >
<asp:DropDownLi st id="cmbNewFe_nu m" DataSource="<%# PopulateNewFe_n um()
%>" DataValueField= "Id" DataTextField=" Fe_num" runat="server"
OnSelectedIndex Changed="<%# CheckFe_num() %>"/>
</FooterTemplate>
........
........
........
<FooterTemplate >
<asp:TextBox id="txtNewFe_na me" runat="server" TextMode="Multi Line" />
</FooterTemplate>
.......
.......

MyPage.aspx.vb
.....
.....
Function CheckFe_num()
If CType(FindContr ol("cmbFe_num") , DropDownList).S electedItem.Val ue > 0
Then
CType(FindContr ol("txtNewFe_na me"), TextBox).Text = ""
CType(FindContr ol("txtNewFe_na me"), TextBox).Visibl e = False
Else
CType(FindContr ol("txtNewFe_na me"), TextBox).Visibl e = True
End If
End Function
......
......
Nov 20 '05 #1
0 1267

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4374
by: Lucifer | last post by:
Hi I am trying to raise a bubble event. I have a dropdownlist and a datalist in a datalist. I want to use the postback from the dropdownlist to rebind the nested datalist. But i need the event to be a datalist Command so i have access to e.item for the main datalist
3
4377
by: Tim::.. | last post by:
Can someone please tell me how I go about preselecting an item in a drop drown list when I click the Edit Command in a datagrid? I have tried the following but it doesn't work for me! I would be really grateful for any assistance! Thanks
1
4439
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control, and placed it outside of the DataList and it fires the event just fine. So it's definitely to do with it being in a template. I've managed to reproduce the issue on a small test app, the code and html is below:
1
1586
by: Andy | last post by:
Hello, I have a datagrid which contains DropDownList as follow: <Columns> <asp:TemplateColumn > <ItemTemplate> <asp:DropDownList id=ProductName onSelectedIndexChanged=ProductName_IndexChange>....
0
1726
by: Bengt-Erik Eliasson | last post by:
Hi! In a DataGrid I have a 'Add New'-field in the footer. I want to hide an control (txtNewFe_name) if the value of cmbNewFe_num is >0. How do I do that? The OnSelectedIndexChanged does not seem to response to anything, even though I tryed with just: Function CheckFe_num() Response.Write("Hello World!") End Function
0
951
by: Bengt-Erik Eliasson | last post by:
Hi! In a DataGrid I have a 'Add New'-field in the footer. I want to hide an control (txtNewFe_name) if the value of cmbNewFe_num is >0. How do I do that? The OnSelectedIndexChanged does not seem to response to anything, even though I tryed with just: Function CheckFe_num() Response.Write("Hello World!")
0
1158
by: Dewey | last post by:
I have a datagrid with a footer that has a dropdownlist. I am able to bind the datagrid to a dataset just fine. But I also want to add a listitem that says "-- choose --" to the top of the list. I am doing this in many other places in the app, but not where the dropdownlist is in a datagrid footer. The new item is not appearing. The datagrid name is dlBuyingOfficeDivision and the dropdownlist name is ddDivId. Here's the code
3
4230
by: Shawn | last post by:
Hi. I have a DataGrid with a DropDownList, like this: <asp:DropDownList id="ddlStatusCode" OnSelectedIndexChanged="SetDirty" runat="server"></asp:DropDownList> If the user selects a new value I set a flag on the row in the SetDirty method so that I know the row has been changed. My problem is that now I have to change the value of the DropDownList myself using a javascript, but I don't want the SetDirty method to set a flag on the row. ...
2
16101
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine in my asp tag as shown here: <asp:DropDownList id="ddlTo" runat="server"
0
2080
by: | last post by:
I have 2 dropdownlists in the Footer of a datagrid: ddlStartTime and ddlEndTime. Both contain values like "1:00 AM", "1:15 AM", "1:30 AM", etc. There is also a label named lblTimeDiff. I need to dynamically popolate lblTimeDiff.Text (during onselectedindexchanged of ddlEndTime) with the difference in minutes between ddlStart and ddlEnd in the Footer. I'm sure javascript will come into play
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9948
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.