tags:

views:

39

answers:

2

What I need is a grid with all employees data, and a link to a single employees form. I'm ok with filling the grid with data. my questions are: how to create the link? how to send the parameter (employeeid) to the single-employee page, and make it open with the correct data.

Thanks, Ron

A: 

Try this, it will help. You can use it as a pattern

xscape
that is a very interesting page, i have learned a lot from it.but I did not see there how to open a page from a grid with a param.am I missing something? I'm sure it's possible.
Ron H
+2  A: 

The easiest way is to parameterized the constructor of your form that shows single employee records like:

public PageName(int employeeid)
{
    //do your stuff here.. like retrieving to the database the records of the given employeeid and setting the control values, etc.
}

When you create an instance of that form all you need to do is to provide a employeeid of the selected record on the list like:

PageName x = new PageName(value for employeeid);
Jojo Sardez
thanks. that works.have any clue about how to do that from a grid?
Ron H
You just need to code on the grid's event like mousedoubleclick, etc.
Jojo Sardez