Solved

Multiview

Posted on 2006-07-17
5
882 Views
Last Modified: 2012-06-21
I have a gidview, It has a  hyperlink ( customer ID ) field as the one of columns . would like to be able to navigate  to a page  with customer details where customerId = ( whever the value of hyperlink) by clikcing the hyperlink. but, I am trying to do all this in one page.
So, when the user clik the hyperlink in a gridview, it look like he/she goes to a different page ,but in fact they  are in the same page , just hiding the gridview . In the contrast, when they click "Go to the main Queue"  link , it lead them to the gridview screen  by hiding the custome details....

How can I do this?   Can you show me some examples?
0
Comment
Question by:jung1975
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Swapnil Piparia
ID: 17127692
Hi jung1975,
you can do it by simply putting entry part and gridview part in div tag and mark it as runat="server" like following

<div id="gvpart" runat="server">
gridview
</div>

<div id="entrypart" runat="server">
entrypart with controls
</div>

and in pageload
if(!ispostback)
{
    entrypart.visible = false;
    gvpart.visible = true;
}

and in griview's row command event where you handle your click event on template column.

entrypart.visible =true;
gvpart.visible = false;

so in this way you can show both the screen on same page with visible one at a time.

Regards,
NetSwap
0
 

Author Comment

by:jung1975
ID: 17127738
thanks, but how can I pass the query string ( customer Id) to the detail div, so it can only display the customer details for that specific customerID(query string)?

I was using response.redirect("customerdetail.aspx" + customerId? )..  before
0
 
LVL 16

Accepted Solution

by:
Swapnil Piparia earned 500 total points
ID: 17127773
no not that way.

you can do it by following

in rowcommand event of gridview

you get customerid on clicking on row right
{
customerid = gridview....("customerid")
populateentryscreen(customerid);
}

private populateentryscreen(int custid)
{
   dataset ds = fetchrecordforcustomer(custid);
   textbox1.text = ds.tables[0].row[0]["field1"].tostring();
   .
   .

}

like this you can fill the entry screen on click of gridview.

Thanks
NetSwap.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now