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

still trying to figure out datalist event handler

hey all,
i was just wondering when does the DataList_SelectedIndexChanged ever occur.
I've only used it as a container for other controls such as a link button.

thanks,
rodchar
Oct 25 '06 #1
2 1263
I would hazard a guess that the SelectedIndexChanged event occurs when
the selected index changes.

If the datalist works like other controls, this will occur (without any
extra work from you) when a child control raises the Command event with
a command name of "select".

So <asp:LinkButton id=".." runat="server" CommandName="Select"
Text="Might select a given DataListItem" />

Note: I haven't tested that, but the GridView handles ItemCommand
events with command names of "select", "insert", "update", and "delete"
automatically and fires the appropriate GridView events.
rodchar wrote:
hey all,
i was just wondering when does the DataList_SelectedIndexChanged ever occur.
I've only used it as a container for other controls such as a link button.

thanks,
rodchar
Oct 26 '06 #2
Thank you, i was missing the CommandName=Select part.

"Flinky Wisty Pomm" wrote:
I would hazard a guess that the SelectedIndexChanged event occurs when
the selected index changes.

If the datalist works like other controls, this will occur (without any
extra work from you) when a child control raises the Command event with
a command name of "select".

So <asp:LinkButton id=".." runat="server" CommandName="Select"
Text="Might select a given DataListItem" />

Note: I haven't tested that, but the GridView handles ItemCommand
events with command names of "select", "insert", "update", and "delete"
automatically and fires the appropriate GridView events.
rodchar wrote:
hey all,
i was just wondering when does the DataList_SelectedIndexChanged ever occur.
I've only used it as a container for other controls such as a link button.

thanks,
rodchar

Oct 26 '06 #3

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

Similar topics

4
by: jenn | last post by:
Hi Anyone knows how to access to a value of a row in a datalist. Something like this in datagrid Dim str = MyDataGrid.Cell(0).tex I would like something like this Dim str =...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
2
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
5
by: TCORDON | last post by:
I have a DataList with a bunch of items (eg. Shoppiong Cart) each Item has a Remove button, in the code Behind page I have a Sub called Remove Item which calls a Function like this: Public...
2
by: haroldsphsu | last post by:
Hi all, I created a DataList on a WebForm, and I want to have a separate delete button at the bottom of the page. I can create a event handler for the delete button and delete the selected item...
4
by: Nathan Sokalski | last post by:
I have a DataList that has an Button as one of the controls in it's ItemTemplate. The Button has a CommandName="delete" attribute, but when I click it the DeleteCommand event doesn't even get...
2
by: Jason James | last post by:
Hi, I have a datalist that contains a series of thumbnails. I am in the process of paging this datalist so that only 20 images are displayed at a time. Each image has associated with it a...
1
by: Arpan | last post by:
The following code displays records from a SQL Server 7 database table in a DataList (when the page loads for the first time, all the records under the column named "FName" in the DB table are...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
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: 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
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
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
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
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...

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.