Click here to Skip to main content
15,898,035 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk5-Jul-06 19:54
minhpc_bk5-Jul-06 19:54 
GeneralRe: Transfer of datagrid to another webform [modified] Pin
blurMember5-Jul-06 20:34
blurMember5-Jul-06 20:34 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk5-Jul-06 20:44
minhpc_bk5-Jul-06 20:44 
GeneralRe: Transfer of datagrid to another webform Pin
blurMember5-Jul-06 21:41
blurMember5-Jul-06 21:41 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk5-Jul-06 22:27
minhpc_bk5-Jul-06 22:27 
GeneralRe: Transfer of datagrid to another webform Pin
blurMember5-Jul-06 23:16
blurMember5-Jul-06 23:16 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk5-Jul-06 23:29
minhpc_bk5-Jul-06 23:29 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk6-Jul-06 0:06
minhpc_bk6-Jul-06 0:06 
blurMember wrote:
this.dgDisplay.DataSource=ds;
this.GridData = this.dgDisplay.DataSource;
this.dgDisplay.DataBind();

That's enough. So here you populate the dataset ds and bind it to the grid control in the ShowAllWeek method, you then assign the datagrid's DataSource property to the GridData property of the web page, and I think that the ShowAllWeek does not execute when you hit the button. To fix this code, I suggest you saparate to your code to populate the dataset object in a seperate method, say BuildDataSource, which returns the result populated dataset ds. In the Page_Load of the first form, you can write your code like this:
 private void Page_Load(object sender, System.EventArgs e)
{
    DataSet ds = BuildDataSource();
    this.GridData = ds;

    //You may only need to bind ds to the grid just one time:
    if(!IsPostBack())
    {
         this.dgDisplay.DataSource=ds;
         this.dgDisplay.DataBind();
    }
}

GeneralRe: Transfer of datagrid to another webform Pin
blurMember9-Jul-06 17:18
blurMember9-Jul-06 17:18 
GeneralRe: Transfer of datagrid to another webform Pin
minhpc_bk10-Jul-06 19:56
minhpc_bk10-Jul-06 19:56 
QuestionString from and to a class Pin
oskardiazdeleon5-Jul-06 14:12
oskardiazdeleon5-Jul-06 14:12 
AnswerRe: String from and to a class Pin
minhpc_bk5-Jul-06 16:17
minhpc_bk5-Jul-06 16:17 
AnswerRe: String from and to a class Pin
Guffa5-Jul-06 20:12
Guffa5-Jul-06 20:12 
QuestionPassing attributes using hyperlink [modified] Pin
theprinc5-Jul-06 6:35
theprinc5-Jul-06 6:35 
AnswerRe: Passing attributes using hyperlink Pin
minhpc_bk5-Jul-06 16:14
minhpc_bk5-Jul-06 16:14 
Questionserving .mdb files over web Pin
tha_dude5-Jul-06 6:33
tha_dude5-Jul-06 6:33 
AnswerRe: serving .mdb files over web Pin
Not Active5-Jul-06 6:52
mentorNot Active5-Jul-06 6:52 
GeneralRe: serving .mdb files over web Pin
tha_dude5-Jul-06 7:26
tha_dude5-Jul-06 7:26 
AnswerRe: serving .mdb files over web Pin
Guffa5-Jul-06 8:53
Guffa5-Jul-06 8:53 
QuestionI want to create Menus Pin
Biswa Ranjan Nanda5-Jul-06 6:26
Biswa Ranjan Nanda5-Jul-06 6:26 
AnswerRe: I want to create Menus Pin
bluewavestrider5-Jul-06 7:51
bluewavestrider5-Jul-06 7:51 
GeneralRe: I want to create Menus Pin
varun_khanna176-Jul-06 0:47
varun_khanna176-Jul-06 0:47 
QuestionASP.NET 1.1 or ASP.NET2.0 Pin
neuropathie5-Jul-06 5:42
neuropathie5-Jul-06 5:42 
AnswerRe: ASP.NET 1.1 or ASP.NET2.0 Pin
wEb GuRu...5-Jul-06 5:52
wEb GuRu...5-Jul-06 5:52 
AnswerRe: ASP.NET 1.1 or ASP.NET2.0 Pin
Mike Ellison5-Jul-06 6:08
Mike Ellison5-Jul-06 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.