473,583 Members | 3,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple: passing multiple variables into a datagrid hyperlinkcolumn ?

Roy
I'm assuming this is amazingly simple and I'm just missing the boat.

On the html side of an asp.net page I have a datagrid, a "search"
button, and 8 text boxes for search criteria. A user enters in varying
search criteria, hits "search", info is passed to a stored proc,
results return and displayed in the datagrid.

Every field in the datagrid is numeric (indicative of a certain sum or
total) data but also functions as a hyperlinkcolumn . So when joe bloe
clicks on the number "3" in column 7, another page will pop up with the
3 records associated with that record. Make sense? Basically it's a
reports page with drill-down functionality.

Problem: how can I pass all 8 of the search criteria along to the
drill-down page? I know how to send info in this fashion:

<asp:HyperLinkC olumn DataTextField=" adj" DataNavigateUrl Field="voydoc"
datanavigateurl formatstring="a dj.aspx?Id={0}"
Target="_blank" HeaderText="Adj usted Booking"
HeaderStyle-HorizontalAlign ="Center" ItemStyle-Font-Bold="true">

But this only grabs data from within the datagrid itself. I'll need to
pass info from the vb code-behind. I'm trying to avoid using session
variables if at all possible.

Anyone have any tips or links?

Thanks very much.

Nov 19 '05 #1
1 2817
Roy
I guess there isn't a way to accomplish this.
It would appear I would have to use a templatecolumn and a hyperlink
within. Only problem there is I'd lose the functionality of displaying
actual data from a result set. Adding hyperlinkcolumn 's on the fly in
the code-behind seems a non-workable option as the datagrid columns are
arranged according to overlord request and I can't seem to set where in
the datagrid column index I want added columns to appear.

Gah. Sometimes it's just not my day. ;)


Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
From: "Roy" <roy.ander...@g mail.com> - Find messages by this author
Date: 20 Jul 2005 15:25:19 -0700
Local: Wed,Jul 20 2005 6:25 pm
Subject: Simple: passing multiple variables into a datagrid
hyperlinkcolumn ?
I'm assuming this is amazingly simple and I'm just missing the boat.
On the html side of an asp.net page I have a datagrid, a "search"
button, and 8 text boxes for search criteria. A user enters in varying
search criteria, hits "search", info is passed to a stored proc,
results return and displayed in the datagrid.
Every field in the datagrid is numeric (indicative of a certain sum or
total) data but also functions as a hyperlinkcolumn . So when joe bloe
clicks on the number "3" in column 7, another page will pop up with the

3 records associated with that record. Make sense? Basically it's a
reports page with drill-down functionality.
Problem: how can I pass all 8 of the search criteria along to the
drill-down page? I know how to send info in this fashion:
<asp:HyperLinkC olumn DataTextField=" adj" DataNavigateUrl Field="voydoc"
datanavigateurl formatstring="a *dj.aspx?Id={0} "
Target="_blank" HeaderText="Adj usted Booking"
HeaderStyle-HorizontalAlign ="C*enter" ItemStyle-Font-Bold="true">
But this only grabs data from within the datagrid itself. I'll need to
pass info from the vb code-behind. I'm trying to avoid using session
variables if at all possible.
Anyone have any tips or links?
Thanks very much.

Nov 19 '05 #2

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

Similar topics

5
1799
by: DC Gringo | last post by:
I've got a command button to submit a value from a dropdown list that should then filter a SELECT query. I'm simply appending a WHERE colx = <variableSelectedFromDropdownList>. How do I pass this value into the event handler? -- MY EVENT HANDLER Sub RunReport_OnClick(sender As Object, e As System.EventArgs) _sqlStmt = _sqlStmt & "...
2
2048
by: aparnasinha26 | last post by:
Hi All, I have to pass variable in a query string. The query string is in the hyperlink coloumn of a datgrid. The code appears like this <asp:HyperLinkColumn DataNavigateUrlField="ProductID" DataNavigateUrlFormatString="ViewProduct.aspx?qProductID='<%strProduct%>'" DataTextField="ProductID" HeaderText="Product ID"> <HeaderStyle...
2
1320
by: ltt19 | last post by:
Hi. I have a DataGrid control that has one HyperLinkColumn, and this page has a "default.css" loaded, so, the link Style of the DataGrid is the same of the css document... but I want to change it, the link style of the Datagrid must be different from the others.. Even if I set all the format of the datagrid, everything changes... except the...
2
1706
by: Tim::.. | last post by:
Hi Can someone please tell me why my datagrid doesn't populate with data properly... For some reason the DataNavigateUrlFormatString populates ok but Text doesn't??? E.G: Text="<%Container.DataItem(Name) %>" I would really appritiate any help!
0
1929
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...
2
1670
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" ...
3
2213
by: amjad | last post by:
Hi i have a webpage which has datagrid with one column called customer ID.. that customer ID is hyperlink mean i a click that customer ID it open a web page and display that customer ID on that page. is it possible to exchange value between web pages like my code is <asp:DataGrid id="DataGrid1" runat="server" Height="114px" Width="320px"...
3
4322
by: Jl_G_0 | last post by:
Hey all, I need to add a hyperlinkcolumn to a datagrid, but the path (DataNavigateUrlFormatString) is dynamic, since the page lists files in directories. The folder name to list is stored in a variable (strPath). The code that I tried is: DataNavigateUrlFormatString='<%#strPath %>/{0}' But it says: "Databinding expressions are only...
2
1664
by: tshad | last post by:
I am having a problem with my Datagrid that displays my Files via GetFiles() If I use a HyperLinkColumn - I can use the column name "Name" which is what the result from GetFiles(). ******************************************************** Sub GetFileList() Dim dirInfo as DirectoryInfo = new DirectoryInfo(Server.MapPath("/uploads/"))
0
7896
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7827
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...
0
8184
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. ...
1
7936
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...
0
8195
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...
1
5701
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...
0
5375
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...
0
3845
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2334
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.