-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: _Neeraj_
Message 4 in Discussion
Hi Sanju,
To call your custom function from the Datagrid's itemtemplate column,
then do it this way :
<asp:TextBox .... bla bla bla ..... Text = '<%#
Myfunction(Container.DataItem("fname"),Container.DataItem("lname"))'
%>
And in the cs file i.e. yoru code behind file define the function
something like this
public string Myfunction(object fname, object lname)
{
//type cast/convert the parameters to the desired datatypes.
string FirstName = (string) fname;
string LastName = (string) lname;
// process fname and lname here and resturn the output of the desired datatype
return ( FirstName + " " + LastName ) ;
}
See if it works for you.
Regards,
Neeraj
----- Original Message -----
From: Sanju <[EMAIL PROTECTED]>
Date: Tue, 20 Jul 2004 00:00:11 -0700
Subject: Re: Datagrid Help ..
To: BDOTNET <[EMAIL PROTECTED]>
New Message on BDOTNET
Datagrid Help ..
Reply
Reply to Sender Recommend Message 3 in Discussion
From: Sanju
Hi Kandwal,
But i want to call a userdefined function and pass parameter to that
and then bind to the datagrid
<%# Myfunction(Container.DataItem("fname"),Container.DataItem("lname"))%>
Myfunction is userdefined function
View other groups in this category.
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating |
Daily Horoscopes
To stop getting this e-mail, or change how often it arrives, go to
your E-mail Settings.
Need help? If you've forgotten your password, please go to Passport
Member Services.
For other questions or feedback, go to our Contact Us page.
If you do not want to receive future e-mail from this MSN group, or if
you received this message by mistake, please click the "Remove" link
below. On the pre-addressed e-mail message that opens, simply click
"Send". Your e-mail address will be deleted from this group's mailing
list.
Remove my e-mail address from BDOTNET.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]