Solved

Multiview

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

820 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