473,799 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem accessing the value of a hyperlinkcolumn

I have a datagrid whose rows contain checkbox and
hyperlink columns(contain ing employee_id field retireved
from database). Once the user checks the checkboxes i
need to get the employee ids whose checkboxes were
checked.

To retireve the employee_id i was looping throught the
datagrid items and trying to get the employeeid from the
first column as

dg1.items(i).ce lls(1).text

But this gives me a null value.
How can i make this work.

Thanks in advance

Nov 21 '05 #1
4 1132
The first column would be this:

dg1.items(i).ce lls(0).text

You are probably grabbing the checkbox column and that has a text value of
null.

Hope that helps
Chris
"Bauer" <an*******@disc ussions.microso ft.com> wrote in message
news:00******** *************** *****@phx.gbl.. .
I have a datagrid whose rows contain checkbox and
hyperlink columns(contain ing employee_id field retireved
from database). Once the user checks the checkboxes i
need to get the employee ids whose checkboxes were
checked.

To retireve the employee_id i was looping throught the
datagrid items and trying to get the employeeid from the
first column as

dg1.items(i).ce lls(1).text

But this gives me a null value.
How can i make this work.

Thanks in advance

Nov 21 '05 #2
The first column would be this:

dg1.items(i).ce lls(0).text

You are probably grabbing the checkbox column and that has a text value of
null.

Hope that helps
Chris
"Bauer" <an*******@disc ussions.microso ft.com> wrote in message
news:00******** *************** *****@phx.gbl.. .
I have a datagrid whose rows contain checkbox and
hyperlink columns(contain ing employee_id field retireved
from database). Once the user checks the checkboxes i
need to get the employee ids whose checkboxes were
checked.

To retireve the employee_id i was looping throught the
datagrid items and trying to get the employeeid from the
first column as

dg1.items(i).ce lls(1).text

But this gives me a null value.
How can i make this work.

Thanks in advance

Nov 21 '05 #3
no my first column is a checkbox and second is a
hyperlinkcolumn . So i was trying to access the value
using dg1.items(i).ce lls(1).text This way of retrieving
works if my employee_id was a boundcolumn. when i changed
it to hyperlink column it does not work.

-----Original Message-----
The first column would be this:

dg1.items(i).c ells(0).text

You are probably grabbing the checkbox column and that has a text value ofnull.

Hope that helps
Chris
"Bauer" <an*******@disc ussions.microso ft.com> wrote in messagenews:00******* *************** ******@phx.gbl. ..
I have a datagrid whose rows contain checkbox and
hyperlink columns(contain ing employee_id field retireved from database). Once the user checks the checkboxes i
need to get the employee ids whose checkboxes were
checked.

To retireve the employee_id i was looping throught the
datagrid items and trying to get the employeeid from the first column as

dg1.items(i).ce lls(1).text

But this gives me a null value.
How can i make this work.

Thanks in advance

.

Nov 21 '05 #4
no my first column is a checkbox and second is a
hyperlinkcolumn . So i was trying to access the value
using dg1.items(i).ce lls(1).text This way of retrieving
works if my employee_id was a boundcolumn. when i changed
it to hyperlink column it does not work.

-----Original Message-----
The first column would be this:

dg1.items(i).c ells(0).text

You are probably grabbing the checkbox column and that has a text value ofnull.

Hope that helps
Chris
"Bauer" <an*******@disc ussions.microso ft.com> wrote in messagenews:00******* *************** ******@phx.gbl. ..
I have a datagrid whose rows contain checkbox and
hyperlink columns(contain ing employee_id field retireved from database). Once the user checks the checkboxes i
need to get the employee ids whose checkboxes were
checked.

To retireve the employee_id i was looping throught the
datagrid items and trying to get the employeeid from the first column as

dg1.items(i).ce lls(1).text

But this gives me a null value.
How can i make this work.

Thanks in advance

.

Nov 21 '05 #5

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

Similar topics

0
4846
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME" DataNavigateUrlFormatString="http://www.aaa.com?Name={0}" SortExpression="NAME" />
0
1088
by: Atif Jalal | last post by:
I am using a Datagrid control and one of its column is a 'HyperLinkColumn'. The link text for this HyperLinkColumn is sometimes beyond 100 characters. I would like to display the link on multi-line if the number of characters in the link exceed 100 characters. I tried adding the <ItemStyle> to the HyperLinkColumn tag but it did not work, the whole of the link is displayed on one line with the column width getting extended. ...
9
15032
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring = datagrid.Items(rownumber).Cells.Item(column number).Text returns a blank string. It seems to work ok for the other columns that are just regular datagrid columns, not hyperlink types. Thanks. -- Paul G Software engineer.
1
1472
by: Craig | last post by:
I have a datagrid with a couple of columns. Right now, I'm setting assigning the dataview to the datasource. For the HyperLinkColumn.... <asp:HyperLinkColumn DataNavigateUrlField="ATTACHMENTDOWNLOADURL" Text="Download" HeaderText="Quick Links" SortExpression="FILEPATH"/> The field in the dataview is something like: "/mypath/tomyfile/hello.txt" the link gets set to http://localhost/mypath/tomyfile/hello.txt" I want the base of the...
0
860
by: Bauer | last post by:
I have a datagrid whose rows contain checkbox and hyperlink columns(containing employee_id field retireved from database). Once the user checks the checkboxes i need to get the employee ids whose checkboxes were checked. To retireve the employee_id i was looping throught the datagrid items and trying to get the employeeid from the first column as
0
1931
by: virendra.chandra | last post by:
in datagrid cellpadding is not working. can u suggest what could be the possible error. this is my code <asp:datagrid id="test1" Runat="server" Width="700" Enabled="True" AutoGenerateColumns="False" Font-Size="8pt" PagerStyle-Wrap="True" AllowSorting="True" CellSpacing="2" CellPadding="3" GridLines="Vertical" ItemStyle-Wrap=True HeaderStyle-Wrap=True
2
1677
by: Donkey | last post by:
Hi, Despite the many examples i can't find the right way to pass a value of a datagrid to another form. So could someone please explain me what i am doing wrong. so i have a datagrid with an invisible column and a templatecolumn with which i want to pass the value of the first column. <asp:BoundColumn DataField="ChecklijstID" ReadOnly="True"
3
1547
by: settyv | last post by:
Hi, I need to generate PDF stream when i click on Linkbutton in datagrid ..At present i hardcoded the DMS Id and now it is working.But i need to pass DMS ID when click linkbutton.How can i do that? Here is the ASPX code: <asp:datagrid id="grdTentativeResults" Width="800" Runat="server"
3
2555
by: TB | last post by:
On a user control (ascx) I have a datagrid with a hyperlink column containing the following code: <asp:HyperLinkcolumn headerstyle-width="80px" ItemStyle-Width="80px" DataNavigateUrlField="ID" DataNavigateUrlFormatString="home.aspx? i={0}&amp;<%=lang%>" Text="Click"></asp:HyperLinkcolumn> However when I run the page containing the user control, the resulting link in the column litterally contains ";<%=lang%>" and not the lang
0
9544
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
10490
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
10238
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
10030
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
9077
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
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
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.