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

TemplateColumn with multiple parameters

Hi everyone,

I have the following TemplateColumn in a datagrid where I process my data in
another function and return it's result.
<asp:TemplateColumn HeaderText="File" SortExpression="FileName">
<ItemTemplate>
<%# CreateFileHyperlink(DataBinder.Eval(Container.Data Item,
"FileName")) %>
</ItemTemplate>
</asp:TemplateColumn>

public string CreateFileHyperlink(Object FileName)
{
Nov 18 '05 #1
1 1113
Jos
Maziar Aflatoun wrote:
Hi everyone,

I have the following TemplateColumn in a datagrid where I process my
data in another function and return it's result.
<asp:TemplateColumn HeaderText="File" SortExpression="FileName">
<ItemTemplate>
<%# CreateFileHyperlink(DataBinder.Eval(Container.Data Item,
"FileName")) %>
</ItemTemplate>
</asp:TemplateColumn>

public string CreateFileHyperlink(Object FileName)
{
.
.
.
return FileName.ToString();
}

Here I send the field value FileName. Now is it possible to send
multiple fields? such as FileName, FileID...etc? (it's defined in my
table)

Thank you
Maz.


Sure it's possible:
<%# CreateFileHyperlink(DataBinder.Eval(Container.Data Item,
"FileName"),DataBinder.Eval(Container.DataItem,"Ta rget")) %>

And:

public string CreateFileHyperlink(Object FileName,Object Target)
{
Nov 18 '05 #2

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

Similar topics

3
by: Krzysztof Karnicki | last post by:
Hi, I need to create DataGrid with TemplateColumns in Codebehind so I do something like that: TemplateColumn templateColumn = new TemplateColumn(); templateColumn.HeaderText = "header title";...
0
by: Steve R | last post by:
I have a Datagrid with several TemplateColumns. I am creating ALL (BoundColumn & TemplateColumn) of the columns for the DataGrid during the PAGE_INIT. One TemplateColumn is a checkbox that allows...
1
by: Steve R | last post by:
I have a Datagrid with several TemplateColumns. I am creating ALL (BoundColumn & TemplateColumn) of the columns for the DataGrid during the PAGE_INIT. One TemplateColumn is a checkbox that allows...
1
by: Steven K | last post by:
Hello, I am calling a SQL Server 2K parameter query with the following: Dim spWebDocGroup As OleDb.OleDbDataReader Dim prmWebDocGroup As OleDbParameter Dim cmdWebDocGroup As New...
1
by: Dave | last post by:
Hello. Can anybody explain me how to use TemplateColumn?
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
2
by: tshad | last post by:
The following gives me an error: Character is not valid The TemplateColumn <asp:TemplateColumn Visible="true" HeaderText="Meets Job Rqrmnts" ItemStyle-Width="170px"...
2
by: MrCrool | last post by:
Hi I need to be able to handle the following ASP programming in pure C# code: <asp:TemplateColumn HeaderText="Customer Information"> <ItemTemplate> <table border="0"> <tr> <td...
3
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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,...
0
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...

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.