473,625 Members | 2,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what to use in itemcommand (e.item.dataite m)

Hi, in ItemDatabound i can use e.item.dataitem (x).Tostring to read a field
from a datalist, but what to use to read from the datalist when a button in
the selected row in the datalist is pushed and the ItemCommand is used? I
cant use e.item.dataitem in the itemcommand, i can use
DataList.DataKe ys(e.Item.ItemI ndex).tostring to get the value of the key
field, how can i use this key field information to read a spesific field in
the datalist?

/Per W.
Apr 1 '07 #1
0 2064

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

Similar topics

2
3943
by: Kel Good | last post by:
Hello, I am binding a custom IList object to a DataList that I am using for a web menu. The items in the custom IList have properties that allow me to dynamically define how my menu behaves. My binding syntax is standard: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MenuItems.DataSource = GetMyCustomIList MenuItems.DataBind()
3
24635
by: MattB | last post by:
I swear I've made this work no problem before and I'm not sure what's gone wrong. I have a form with a datagrid that I'm binding to a DatTable I generate on the fly. If I just bind and load the page I can see all my data fine. Now I want to add a textbox for each row and pre-populate that box with values from my DataTable. So I created a OnItemDataBound event and it's firing. My problem is that any time I try to reference data in the...
3
3454
by: danc | last post by:
I have a datagrid with a checkbox and dropdown list in each row. Both set AutoPostBack to true and ItemCommand and OnSelectedIndexChanged events for these controls works fine when DataGrid is not paged. As soon as I turn on paging support, I no longer get events properly for any page except the first. 1) The DataGrid displays the page numbers on the top (and bottom). Whenever I click to go to a specific page number, the DropDownList's...
7
2228
by: Mirek Endys | last post by:
Hello, the problem I have now, is: Im binding generic collection based on List<iDB2SQLTransferItem> // iDB2SQLTransferItem is my class // into WebCOntrol DataList. But the DataItem of the DataListCommandEventArgs is null. Here is my code: private MyData.iDB2SQLTransfers transfers = null;
2
3448
by: ibiza | last post by:
Hi all, I have a simple scenario where I simply bien a repeater to a datasource. Here's my repeater definition : <asp:Repeater id="rTitles" runat="server" EnableViewState="false" OnItemDataBound="Bind"> <headertemplate> <ul> </headertemplate>
2
5592
by: Eric | last post by:
Hello, I have a repeater control bound to an XmlDataSource. Works great. Now, I want to handle the ItemDataBound event--the e.Item.DataItem object in particular. Its type is System.Web.UI.WebControls.XmlDataSourceNodeDescriptor, which contains the XmlNode needed to reference the data. The problem is that _node is a private member of the
1
7192
by: Nathan Sokalski | last post by:
I need to access one of the columns from the current DataItem in the ItemCommand event, which I call using EventBubbling with a DataList and Button control. The code I tried to use to access the current DataItem is the following: CStr(CType(e.Item.DataItem, DataRowView)("id")) However, after some experimenting, I found out that e.Item.DataItem is Nothing in the ItemCommand event by using the following statement:
1
6746
by: Nathan Sokalski | last post by:
I have a custom Control that I have made that contains a DataList. In either the ItemCommand or SelectedIndexChanged event I need to retrieve a value from the DataItem of the SelectedItem. I have tried the following two techniques: Private Sub datProductList_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles datProductList.ItemCommand Me.selectedproduct =...
1
2299
by: Stuart Shay | last post by:
Hello All: I have a Datalist where each row has TextBoxes and Dropdowns that are created dynamically. The code renders correctly and is very similar to this sample I found http://www.codeguru.com/csharp/.net/net_asp/controls/article.php/c12495/ void rptFields_ItemDataBound(object sender, RepeaterItemEventArgs e) {
0
8182
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
8688
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...
1
8352
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
8494
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
5570
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();...
0
4085
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...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
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.