Datagrid events disappear

Discussion in 'ASP .Net Building Controls' started by olcay_sahin, May 31, 2005.

  1. olcay_sahin

    olcay_sahin Guest

    Datagrid events disappear when i edit web form (aspx) from visual studio.
    How can i solve this problem. ( in InitializeComponent )
    Thanks ...
     
    olcay_sahin, May 31, 2005
    #1
    1. Advertising

  2. olcay_sahin

    beanweed Guest

    Yeah, I hate when that happens; you would think they had fixed that by now.

    I always write or copy-and-paste event declarations, control initialisers,
    etc. into my own method like "Page_Init_Really()" and call that method from
    Page_Init. For example

    Private Sub InitializeComponent()
    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    InitializeComponent()
    Page_Init_Really()
    End Sub

    Private Sub Page_Init_Really()
    . . . event delegates, initializers, blah blah blah . . .

    Works for me.

    "olcay_sahin" wrote:

    > Datagrid events disappear when i edit web form (aspx) from visual studio.
    > How can i solve this problem. ( in InitializeComponent )
    > Thanks ...
    >
     
    beanweed, May 31, 2005
    #2
    1. Advertising

  3. olcay_sahin

    olcay_sahin Guest

    if i can't solve this, i'll try it like your solution. But is there any
    other alternative?
    is this a bug for VS.


    "beanweed" wrote:

    > Yeah, I hate when that happens; you would think they had fixed that by now.
    >
    > I always write or copy-and-paste event declarations, control initialisers,
    > etc. into my own method like "Page_Init_Really()" and call that method from
    > Page_Init. For example
    >
    > Private Sub InitializeComponent()
    > End Sub
    >
    > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Init
    > InitializeComponent()
    > Page_Init_Really()
    > End Sub
    >
    > Private Sub Page_Init_Really()
    > . . . event delegates, initializers, blah blah blah . . .
    >
    > Works for me.
    >
    > "olcay_sahin" wrote:
    >
    > > Datagrid events disappear when i edit web form (aspx) from visual studio.
    > > How can i solve this problem. ( in InitializeComponent )
    > > Thanks ...
    > >
     
    olcay_sahin, May 31, 2005
    #3
  4. olcay_sahin

    beanweed Guest

    I am using the 2002 version of VS. If one lets the IDE build the objects then
    there is no problem; that is, if you drag the datagrid from the toolbar onto
    the page and then doubleclick it to get the click event handler, all is well.
    It's when you create delegates by actually typing the code in the code editor
    that VS loses interest. Even if you use exactly the same code! There was
    supposed to be something done in VS-2005, but my friend who is using that
    version says the problem has come up again.

    "olcay_sahin" wrote:

    > if i can't solve this, i'll try it like your solution. But is there any
    > other alternative?
    > is this a bug for VS.
    >
    >
    > "beanweed" wrote:
    >
    > > Yeah, I hate when that happens; you would think they had fixed that by now.
    > >
    > > I always write or copy-and-paste event declarations, control initialisers,
    > > etc. into my own method like "Page_Init_Really()" and call that method from
    > > Page_Init. For example
    > >
    > > Private Sub InitializeComponent()
    > > End Sub
    > >
    > > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Init
    > > InitializeComponent()
    > > Page_Init_Really()
    > > End Sub
    > >
    > > Private Sub Page_Init_Really()
    > > . . . event delegates, initializers, blah blah blah . . .
    > >
    > > Works for me.
    > >
    > > "olcay_sahin" wrote:
    > >
    > > > Datagrid events disappear when i edit web form (aspx) from visual studio.
    > > > How can i solve this problem. ( in InitializeComponent )
    > > > Thanks ...
    > > >
     
    beanweed, May 31, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. raymond chiu

    field explorer disappear

    raymond chiu, Jun 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    raymond chiu
    Jun 29, 2004
  2. raymond chiu

    Field explorer disappear

    raymond chiu, Jun 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    raymond chiu
    Jun 29, 2004
  3. Replies:
    4
    Views:
    1,656
  4. smithb1028

    DataGrid Paging makes DataGrid Disappear

    smithb1028, Jan 27, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    1,496
    smithb1028
    Jan 28, 2007
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    420
    Chris
    Aug 30, 2005
Loading...

Share This Page