473,397 Members | 2,056 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,397 software developers and data experts.

accessing child controls

i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:

Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
....
....
e.Cell.Controls.Add(ddl)

However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.

Can anyone advise how to make autopostback work and to access the
values of each select in the postback.

Thanks in advance

Dan

Apr 23 '07 #1
3 1143
On Apr 23, 12:27 pm, vespaboy <danielev...@gmail.comwrote:
i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:

Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
...
...
e.Cell.Controls.Add(ddl)

However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.

Can anyone advise how to make autopostback work and to access the
values of each select in the postback.

Thanks in advance

Dan
Auto post back on what event?

ddl.{event_here} += New EventHandler({your_sub_here})

Apr 23 '07 #2
On Apr 23, 11:35 am, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Apr 23, 12:27 pm, vespaboy <danielev...@gmail.comwrote:
i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:
Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
...
...
e.Cell.Controls.Add(ddl)
However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.
Can anyone advise how to make autopostback work and to access the
values of each select in the postback.
Thanks in advance
Dan

Auto post back on what event?

ddl.{event_here} += New EventHandler({your_sub_here})
auto postback on selectedindexchanged. i've tried:

AddHandler ddl.SelectedIndexChanged, AddressOf
ddl_SelectedIndexChanged

but still nothing

Apr 23 '07 #3
On Apr 23, 4:47 pm, vespaboy <danielev...@gmail.comwrote:
On Apr 23, 11:35 am, Alexey Smirnov <alexey.smir...@gmail.comwrote:


On Apr 23, 12:27 pm, vespaboy <danielev...@gmail.comwrote:
i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:
Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
...
...
e.Cell.Controls.Add(ddl)
However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.
Can anyone advise how to make autopostback work and to access the
values of each select in the postback.
Thanks in advance
Dan
Auto post back on what event?
ddl.{event_here} += New EventHandler({your_sub_here})

auto postback on selectedindexchanged. i've tried:

AddHandler ddl.SelectedIndexChanged, AddressOf
ddl_SelectedIndexChanged

but still nothing- Hide quoted text -

- Show quoted text -
Well, I got it... The OnDayRender happends after the PostBack events
are handled. It means you add a control which cannot be fired.

Apr 23 '07 #4

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

Similar topics

6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
8
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender,...
5
by: Jonathan Williams | last post by:
Hi, I have an object which inherits from WebControl (CUSTOM : WebControl) In this object I have code in which I add child contols: protected override void CreateChildControls() {...
4
by: John Holmes | last post by:
I'm using data to rename some web controls on a form that uses a repeater contol and so it can have mulitple instances of the same control set. The controls get renamed (thanks to Steven Cheng's...
6
by: arvee | last post by:
Is there a way to access controls (and their properties) in a user control? The Web Form Designer marks controls as 'Protected' which makes them inaccessable from the host form. If I mark them as...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
by: Mac via DotNetMonster.com | last post by:
Hi all, Is there a way for the MDI parent to reference controls on the active MDI child form? What I actually want to achieve is to know what control on the MDI child currently has focus. Is...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
9
by: JohnR | last post by:
I have the name of a control in a string variable and I want to change one of the controls properties. Right now I recursively scan all the controls on the form until I get one whose name matches...
3
by: =?Utf-8?B?dmJ0cnlpbmc=?= | last post by:
Background: I have a windows form called 'frmMain'. On this form, I have a LABEL control called 'lblWorkStatus', and it's property is set to PUBLIC. On another form, I have a process that checks...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
0
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...
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,...
0
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...

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.