Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Datagrid events disappear

Reply
Thread Tools

Datagrid events disappear

 
 
olcay_sahin
Guest
Posts: n/a
 
      05-31-2005
Datagrid events disappear when i edit web form (aspx) from visual studio.
How can i solve this problem. ( in InitializeComponent )
Thanks ...

 
Reply With Quote
 
 
 
 
beanweed
Guest
Posts: n/a
 
      05-31-2005
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 ...
>

 
Reply With Quote
 
 
 
 
olcay_sahin
Guest
Posts: n/a
 
      05-31-2005
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 ...
> >

 
Reply With Quote
 
beanweed
Guest
Posts: n/a
 
      05-31-2005
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 ...
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid Paging makes DataGrid Disappear smithb1028 ASP .Net 7 01-28-2007 08:59 PM
Outlook Express Messages Disappear, Bookmarks in Internet Explorer Disappear rchrdcarlisle@NOTyahoo.com Computer Support 19 07-30-2006 09:41 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Datagrid: click edit and all the rows disappear! trebor@sirius.com.no.more ASP .Net 4 01-03-2004 07:16 PM
Passing Variables between Web Page Events and HttpModule Events shiv ASP .Net 0 11-21-2003 04:29 PM



Advertisments