473,732 Members | 2,227 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 1725

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

Similar topics

1
4370
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
1585
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
1267
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
950
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
4228
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
16097
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
8946
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
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
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...
0
8186
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
6735
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
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.