473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How raise an OnSelectedIndexChanged for an DropDownList in 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
OnSelectedIndexChanged 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:DropDownList id="cmbNewFe_num" DataSource="<%#
PopulateNewFe_num() %>" DataValueField="Id"
DataTextField="Fe_num" runat="server"
OnSelectedIndexChanged="<%# CheckFe_num() %>"/>
</FooterTemplate>
.........
.........
.........
<FooterTemplate>
<asp:TextBox id="txtNewFe_name" runat="server"
TextMode="MultiLine" />
</FooterTemplate>
........
........

MyPage.aspx.vb
......
......
Function CheckFe_num()
If CType(FindControl("cmbFe_num"),
DropDownList).SelectedItem.Value > 0 Then
CType(FindControl("txtNewFe_name"), TextBox).Text
= ""
CType(FindControl("txtNewFe_name"),
TextBox).Visible = False
Else
CType(FindControl("txtNewFe_name"),
TextBox).Visible = True
End If
End Function
.......
.......
Nov 20 '05 #1
0 929

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

Similar topics

1
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...
3
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...
1
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,...
1
by: Andy | last post by:
Hello, I have a datagrid which contains DropDownList as follow: <Columns> <asp:TemplateColumn > <ItemTemplate> <asp:DropDownList id=ProductName...
0
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...
0
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. ...
3
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...
2
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.