473,396 Members | 1,813 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.

select from datalist w/click/& store in a variable

does anyone know of a good place to go to get some ideas on datalists?
im building a web app, in asp.net (vb.net) and displaying data in a data list.

i want to be able to select any one of the first column items with a "onclick" and store the 'literal' in a variable (either session or global)
at this point i'm not picky at all.

ive tried using the OnItemCommand="someProc" in the code behind w/out much luck

any help is appreciated. ive been looking on the web and in books for days and found all sorts of variations, from making that column a 'link' , to making it an <asp:button>

thanks again as usual.
great great forum here
rik

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 19 '05 #1
2 1326
Try the following:

1. Insert a Select Column from the DataGrid Property Builder

2. Use a SelectedIndexChanged event for the datagrid (DataGrid1_SelectedIndexChanged)

3. In this event handler, the epression:
"DataGrid1.SelectedItem.Cells(1).Text" will return the value of the first column of the selected row.

4. The values of the other columns may be extracted by changing the cell number

5. You may store these variables in session variables or a global variables

Good Luck
Sinan

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 19 '05 #2
Try the following:

1. Insert a Select Column from the DataGrid Property Builder

2. Use a SelectedIndexChanged event for the datagrid (DataGrid1_SelectedIndexChanged)

3. In this event handler, the epression:
"DataGrid1.SelectedItem.Cells(1).Text" will return the value of the first column of the selected row.

4. The values of the other columns may be extracted by changing the cell number

5. You may store these variables in session variables or global variables

Good Luck
Sinan

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 19 '05 #3

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

Similar topics

3
by: olle | last post by:
Hi everyone. Beging a newbee to asp.net and used to work with traditional asp I have one problem working with a datalist. 1/ I make a dataset as as session variable like session("employees") 2/...
1
by: mahsa | last post by:
H data I'm binding to the DataList is information about products in my product database. Perhaps passed in the QueryString to this page is a ProductID. I might want to make the item in the DataList...
0
by: fig000 | last post by:
Hi, I have a datalist with bound data from a database. If I wanted to access one of the fields I would normally use the itemdatabound event to access that field on each row. However in this...
0
by: Jim in Arizona | last post by:
I'm trying to do a simple update of data but I can't get the code right. It's a datalist control that has the update/cancel/delete subroutines. Here's the broken down datalist aspx code (just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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.