Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / May 2005

Tip: Looking for answers? Try searching our database.

Datagrid events disappear

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
olcay_sahin - 31 May 2005 09:27 GMT
Datagrid events disappear when i edit web form (aspx) from visual studio.
How can i solve this problem. ( in InitializeComponent )  
Thanks ...
beanweed - 31 May 2005 10:10 GMT
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.

> Datagrid events disappear when i edit web form (aspx) from visual studio.
> How can i solve this problem. ( in InitializeComponent )  
> Thanks ...
olcay_sahin - 31 May 2005 11:51 GMT
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.

> Yeah, I hate when that happens; you would think they had fixed that by now.
>
[quoted text clipped - 19 lines]
> > How can i solve this problem. ( in InitializeComponent )  
> > Thanks ...
beanweed - 31 May 2005 12:23 GMT
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.

> if i can't solve this,  i'll try it like your solution. But is there any
> other alternative?
[quoted text clipped - 23 lines]
> > > How can i solve this problem. ( in InitializeComponent )  
> > > Thanks ...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.