Solved

Multiview

Posted on 2006-07-17
5
869 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

20 Experts available now in Live!

Get 1:1 Help Now