Solved

Multiview

Posted on 2006-07-17
5
919 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: 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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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