473,666 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="I D_Membre"
OnItemCommand=" Members_ItemCom mand"
OnItemDataBound ="Members_OnIte mDataBound" AutoGenerateCol umns="false"
runat="server">
<Columns>
<asp:BoundColum n ReadOnly="True" DataField="ID_M embre"
Visible="False"/>
<asp:ButtonColu mn CommandName="In fo" HeaderText="Inf o." Text="<img
src='./Image.gif'>">
</asp:ButtonColum n>
</Columns>
</asp:DataGrid>

Sub Members_OnItemD ataBound (sender As Object, e As DataGridItemEve ntArgs )
e.Item.Cells(2) .Attributes.Add ("onClick", "return !window.open
('MembersInfo.a spx?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 1265

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

Similar topics

1
4314
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 (watch the layout, some have child controls):
2
2027
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 level. Is this expected? Shouldn't anything on the properties window render accordingly? Thanks
1
3396
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 event when the user clicks the button column here is my html for the datagrid ************************************************************************************** <Columns> <asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="Title"...
5
1223
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... <HyperLinkColumn><ButtonColumn><ButtonColumn><Data><Data> Can anyone help?
5
6546
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
1406
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 an invoice has been processed I do not want a button to display for this invoice but all other unprocessed invoices need the button to be displayed. Any ideas?
9
5006
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 row in the DataGrid (of course, except the Header & the Footer) is accompanied by a ButtonColumn i.e. there are 10 Buttons in the DataGrid. The Buttons that get rendered by the ButtonColumns - how do I get the ID of each of these Buttons?
8
1253
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: <asp:datagrid id="dgProducts" runat="server"> <asp:ButtonColumn Text="Details" CommandName="Details" ButtonType="PushButton"></asp:ButtonColumn> </asp:datagrid>
2
1358
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: <asp:datagrid id="dgProducts" runat="server"> <asp:ButtonColumn Text="Details" CommandName="Details" ButtonType="PushButton"></asp:ButtonColumn> </asp:datagrid>
2
1458
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 DataGrid that gets populated dynamically from data within a MSSQL database. To keep this short lets just say that the DataGrid gets populated with five rows from the database. There is a “ButtonColumn” within the DataGrid that has the property...
0
8355
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
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7381
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
6191
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
4193
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
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
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
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
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.