C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Window Application


Posted Date: 19 Nov 2008      Posted By: shanthy      Member Level: Silver     Points: 1   Responses: 1



Hi all,

I have a grid in one panel and textbox controls in another panel in a widows form1. I have a button in another form2. when i click the button in form2, it should redirect to the Form1 and should display the grid panel and hide the textbox controls panel. the grid is getting loaded but not displaying.. help me

Form2:
private void btnShow_Click(object sender, EventArgs e)
{
frmRegion frmregion = new Region();
frmregion.ShowRegionGrid(); //public method in form 1

}

Form1:

public void ShowRegionGrid()
{
LoadGrid();
pnlGridWindow.Show();
TextboxControlsPanel.Hide();

}





Responses

Author: Deepika Haridas    19 Nov 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

Use this
keep panel1 and panel2 in form1 public

on form2 -> on button click event write
private void btnshw_Click(object sender, EventArgs e)
{
Form2 objform = new Form2();
objform.Show();
//objform.panel1.Show();
objform.panel2.Hide();
this.Hide();
}

On form1 on page load --> load your grid



Thanks & Regards,
Deepika
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Data Grid Problem
Previous : delete record from gridview and database
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use