473,663 Members | 2,800 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 1264

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
8436
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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,...
1
8548
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
8634
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
7371
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...
0
5657
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
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
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
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.