473,396 Members | 1,858 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,396 software developers and data experts.

Gridview rowcommand or templatefield like to subroutine

Can I have data on Gridview column as a link that runs a row command
and/or a subroutine/function in the vb.net codebehind?

I thought about asp:command, but don't see where I can bind my data in
this?

<ItemTemplate>

<asp:Command ID="View" SkinID="Button" Text="View" CommandName="View"
runat="server" />

</ItemTemplate>
and a templatefield, with a hyperlink, but I think that expects a url
to naviate to.

<asp:TemplateField HeaderText="WorkFlow Number"
SortExpression="WorkFlowNo">

<ItemTemplate>

<asp:HyperLink runat="server" Text='<%#
Container.DataItem("WorkFlowNo") %>'

NavigateUrl='<%# "ActiveWorkFlow.aspx?Search=" +
Container.DataItem("WorkFlowNo").tostring%>' />

</ItemTemplate>

</asp:TemplateField>

Thanks for any help or information.

Apr 2 '07 #1
1 4422
Can I have data on Gridview column as a link that runs a row command
and/or a subroutine/function in the vb.net codebehind?
Is this maybe what you're getting at?

http://www.ben-rush.net/blog/PermaLi...accef6c&dotnet

......or something else?

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"jobs" <jo**@webdos.comwrote in message
news:11*********************@p15g2000hsd.googlegro ups.com...
Can I have data on Gridview column as a link that runs a row command
and/or a subroutine/function in the vb.net codebehind?

I thought about asp:command, but don't see where I can bind my data in
this?

<ItemTemplate>

<asp:Command ID="View" SkinID="Button" Text="View" CommandName="View"
runat="server" />

</ItemTemplate>
and a templatefield, with a hyperlink, but I think that expects a url
to naviate to.

<asp:TemplateField HeaderText="WorkFlow Number"
SortExpression="WorkFlowNo">

<ItemTemplate>

<asp:HyperLink runat="server" Text='<%#
Container.DataItem("WorkFlowNo") %>'

NavigateUrl='<%# "ActiveWorkFlow.aspx?Search=" +
Container.DataItem("WorkFlowNo").tostring%>' />

</ItemTemplate>

</asp:TemplateField>

Thanks for any help or information.

Apr 3 '07 #2

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

Similar topics

1
by: Zule | last post by:
Hi, I am creating a Composite Control within which I have a GridView. In this GridView, I have three TemplateFields, the last one being a template with a LinkButton which is meant to be clicked...
0
by: Mike P | last post by:
When you specify updateparameters or deleteparameters for your gridview, I was under the impression that whether or not you write some code in the rowcommand event to deal with this, the update or...
13
by: AG | last post by:
I have a gridview that I bind to a List(of Type) at runtime. Not using a datasource control. The gridview has a template column with an imagebutton whose commandname is set to 'Delete'. The...
3
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to...
2
by: cartmann | last post by:
Hi, I have a gridview with a template column. In the template column i have two commandbuttons. When clicking the buttons I enter the cmd_click event - but how do I read in which row the button...
4
by: chris | last post by:
I have a perent gridview which includes in a template field a child gridview. Child gridview includes command buttons for opening different windows based on its row selected. I used the code...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
1
by: Sebastian | last post by:
Hello! I have bound a DataTable to my GridView. The DataTable has 3 Columns and I display the Data with TemplateFields in my GridView. I have in the first Column "LinkButton" - Field and in the...
4
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface elements in addition to some information associated with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.