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

Very Urgent - Please suggest me a solution


Hi,

Please help me how can i call the below function on click of datagrid
hyperlink column.
public MemoryStream GetMinuteOrderPdf(SearchParams sp)
{
DMS dms = new DMS();

sp.IsMinuteOrder = true;

return dms.getDocument(sp);//it returns the PDF memory stream
}


ASPX code:

<asp:TemplateColumn HeaderText="Minute Order" >
<ItemTemplate>
<asp:HyperLink
NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
Order"))%</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Please help me how can i call this function.Is there any way to do
this?
Thanks,
Vishnu

Nov 14 '06 #1
3 1104
You can't do it from a hyperlink column as that does not create the event. If
you MUST use a hyperlink column, then call a new page (or pass a querystring
parameter to this page) and call the function from that.

You would normally use a linkbutton or button to cause an event, then in
that event, generate your PDF.

Hope this helps.

Regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available
"se****@gmail.com" wrote:
>
Hi,

Please help me how can i call the below function on click of datagrid
hyperlink column.
public MemoryStream GetMinuteOrderPdf(SearchParams sp)
{
DMS dms = new DMS();

sp.IsMinuteOrder = true;

return dms.getDocument(sp);//it returns the PDF memory stream
}


ASPX code:

<asp:TemplateColumn HeaderText="Minute Order" >
<ItemTemplate>
<asp:HyperLink
NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
Order"))%</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Please help me how can i call this function.Is there any way to do
this?
Thanks,
Vishnu

Nov 14 '06 #2


Thanks for your suggestion.So you meant to say that the below code will
work assuming that i declared linkbutton in the datagrid control:

protected void grdMinSearch_ItemDataBound(object sender,
DataGridItemEventArgs
e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton btn = e.Item.FindControl("linkView") as
LinkButton;
Minute Min=new Minute();

e.Item.Attributes["onclick"] =
Min.GetMinuteOrderPdf(SearchParams sp);
btn.Style[HtmlTextWriterStyle.Display] = "none";
}
}

Please comment on this.

Thanks,
Vishnu

David Colliver wrote:
You can't do it from a hyperlink column as that does not create the event. If
you MUST use a hyperlink column, then call a new page (or pass a querystring
parameter to this page) and call the function from that.

You would normally use a linkbutton or button to cause an event, then in
that event, generate your PDF.

Hope this helps.

Regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available
"se****@gmail.com" wrote:

Hi,

Please help me how can i call the below function on click of datagrid
hyperlink column.
public MemoryStream GetMinuteOrderPdf(SearchParams sp)
{
DMS dms = new DMS();

sp.IsMinuteOrder = true;

return dms.getDocument(sp);//it returns the PDF memory stream
}


ASPX code:

<asp:TemplateColumn HeaderText="Minute Order" >
<ItemTemplate>
<asp:HyperLink
NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
Order"))%</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Please help me how can i call this function.Is there any way to do
this?
Thanks,
Vishnu
Nov 14 '06 #3
Hi,

I can't see anything wrong with that, though there may be some others with
more experience than me that might be able to see any potential issues.

Best regards,
Dave Colliver.
http://www.BracknellFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
<se****@gmail.comwrote in message
news:11*********************@m7g2000cwm.googlegrou ps.com...
>

Thanks for your suggestion.So you meant to say that the below code will
work assuming that i declared linkbutton in the datagrid control:

protected void grdMinSearch_ItemDataBound(object sender,
DataGridItemEventArgs
e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton btn = e.Item.FindControl("linkView") as
LinkButton;
Minute Min=new Minute();

e.Item.Attributes["onclick"] =
Min.GetMinuteOrderPdf(SearchParams sp);
btn.Style[HtmlTextWriterStyle.Display] = "none";
}
}

Please comment on this.

Thanks,
Vishnu

David Colliver wrote:
>You can't do it from a hyperlink column as that does not create the
event. If
you MUST use a hyperlink column, then call a new page (or pass a
querystring
parameter to this page) and call the function from that.

You would normally use a linkbutton or button to cause an event, then in
that event, generate your PDF.

Hope this helps.

Regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available
"se****@gmail.com" wrote:
>
Hi,

Please help me how can i call the below function on click of datagrid
hyperlink column.
public MemoryStream GetMinuteOrderPdf(SearchParams sp)
{
DMS dms = new DMS();

sp.IsMinuteOrder = true;

return dms.getDocument(sp);//it returns the PDF memory stream
}


ASPX code:

<asp:TemplateColumn HeaderText="Minute Order" >
<ItemTemplate>
<asp:HyperLink
NavigateUrl=<%#GetMinuteOrderPdf(DataBinder.Eval(C ontainer.DataItem,"Minute
Order"))%</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Please help me how can i call this function.Is there any way to do
this?
Thanks,
Vishnu


Nov 14 '06 #4

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

Similar topics

1
by: Anurag Saxena | last post by:
Dear Mr Kamath, Thanx for prompt response but Problem is still as it is,I am using registerd scrrun.dll on NT Server and IIS installed on that. When this problem came a month before my sql...
4
by: CGuy | last post by:
Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind();
5
by: VbUser25 | last post by:
hi i need urgent responses.. i have some 15 checkboxex on a form... i want to 1st check the no. of checkboxes that are checked?? and then loop it that many times adn insert the quantities the...
3
by: Tams TS | last post by:
Hi, am in trouble , please giv me some solution. scenario is like this; I have some asp pages and which are commerce server 2000 generated pages and going further am adding one aspx page to the...
1
by: samir dsf | last post by:
hi this is kinda urgent ... i will insert some data in html format..i just need to know how to disply it back.its urgent...so if anyone can suggest pls tell me i simply need to know that if i...
6
by: mahesh | last post by:
Hi friend, I am in deep trouble, I need to change the string in following format " 1.55576+2" in the floating point notation. that is i should have 155.576 as my output. Please suggest some...
33
by: dembla | last post by:
Hey Frnds can anyone help me in this i need a program in 'c' PROGRAM to print NxN Matrix 9 1 8 1 2 3 2 7 3 as 4 5 6 6 4 5 7 8 9 in sorted form
1
by: alok sengar | last post by:
hi, I have already tried this URL's code "http://www.java2s.com/Code/CSharp/Network/SimpleSNMP.htm" but I am getting error when i am creating a UDP type Socket and recieving packet from this...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.