Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiview

Posted on 2006-07-17
5
Medium Priority
?
946 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 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