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

Datagrid and buttonColumn

Hi everyone,
i am having a problem with some parameters. I got a datagrid with several
columns. My first column is hidden and contains a unique ID for a member.
My last column is a buttonColumn. Here's my datagrid code:

<asp:DataGrid id="Members" DataKeyField="ID_Membre"
OnItemCommand="Members_ItemCommand"
OnItemDataBound="Members_OnItemDataBound" AutoGenerateColumns="false"
runat="server">
<Columns>
<asp:BoundColumn ReadOnly="True" DataField="ID_Membre"
Visible="False"/>
<asp:ButtonColumn CommandName="Info" HeaderText="Info." Text="<img
src='./Image.gif'>">
</asp:ButtonColumn>
</Columns>
</asp:DataGrid>

Sub Members_OnItemDataBound (sender As Object, e As DataGridItemEventArgs )
e.Item.Cells(2).Attributes.Add("onClick", "return !window.open
('MembersInfo.aspx?id='+<%MY ID HERE%>);")
End Sub
I want to pass a parameter (My member's id from the hidden column) to a
file that i open with Window.open. So i am asking myself if i can pass that
parameter since my datagrid is built dynamically and if i am going in the
right direction with this code (using itemDatabound event)

Any help, information, code is greatly appreciated!
Thanx in advance.

Jonathan

Jul 21 '05 #1
0 1228

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

Similar topics

1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
2
by: Marty McDonald | last post by:
When setting certain datagrid properties with the IDE (as in the property window), they don't seem to take effect. For instance, Font Name. So I have to set these via code-behind at the cell...
1
by: Lenin Sakthees via .NET 247 | last post by:
Hi all, I am using a datagrid to show values from a SQL table. My problem is, I want to show the details of the each row when the user clicks the 'View details' buttoncolumn. I am able to fire a...
5
by: Alan Seunarayan | last post by:
Hello, I need to create a DataGrid that looks something like this... <HyperLinkColumn><ButtonColumn><Data><Data><ButtonColumn> but I can only seem to produce a DataGrid as below... ...
5
by: Vik | last post by:
If there are a few Select buttons in a datagrid, is there a way to distinguish in code which button was clicked? Thanks.
2
by: Ray Booysen | last post by:
Hi all I have a collection of Invoices that I bind to a datagrid. Some of these invoices have been processed and you can tell this via a property in the invoice class called DateProcessed. If...
9
by: rn5a | last post by:
A DataGrid is populated with the records existing in a database. Each of the row in this DataGrid has a ButtonColumn. Assume that the DataGrid displays 10 records (i.e. 10 DataGridItems/rows). Each...
8
by: brock wade | last post by:
I have a Datagrid that is working fine displying my records, but I'm trying to program buttons on each record line to launch another web page that shows all the details for the product: ...
2
by: brock wade | last post by:
I have a Datagrid that is working fine displying my records, but I'm trying to program buttons on each record line to launch another web page that shows all the details for the product: ...
2
CroCrew
by: CroCrew | last post by:
Hello all, First off I would like to thank anyone that helps me out with this problem that I have. Ok, the environment I am working in is ASP.net with the code behind done in VB. I have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.