Blog ( Of Ryan Olshan)

Recent Posts

News

About Ryan Olshan

LinkedIn Profile

Follow Ryan via twitter

Join StrongTypes - Free Generics Help By Email
Join StrongTypes

Community Credit Winner

View my MVP profile

The posts on this weblog are provided "as is" with no warranties and confer no rights. The opinions expressed herin are my own personal opinions and do not represent my employer's view in any way.

Subscribe to Rolog via My AOL
Subscribe to Rolog via Bloglines


Subscribe to Rolog via Feedburner

Furl Rolog




Subscribe to Rolog via Newsburst


Subscribe to Rolog via Pluck

Add Rolog to Technorati Favorites




Thycotic Secret Server

Receive Email Updates


.NET Websites

  • => StrongTypes.com <=
  • Community Credit
  • DotNetCharity.com
  • DotNetSlackers
  • EasyListBox
  • LearnAsp.com
  • SystemNetMail.com
  • SystemWebMail.com

Blogroll

  • Alex Campbell
  • Carlos Magalhaes
  • Charles Carroll
  • Chris Taylor
  • Darren Neimke
  • David Betz
  • Eric Smith
  • Rob Caron
  • Rob Howard
  • Sam Gentile
  • Scott Guthrie
  • Scott Mitchell
  • Tess
  • Wesner Moise
  • Jason Alexander
  • Bill Ryan
  • Steve Smith
  • Sahil Malik
  • David Silverlight

Other Websites

  • 911 Pigeon Alert
  • Pacific Wildlife Project

Strong Coder Bloggers

  • Dean Fiala
  • Doug Nelson
  • Kevin Jones

Yahoo! Groups

  • => StrongTypes <=
  • AspNet2
  • AspNet20GridView
  • PayPalDevDotNet
  • RubyOnRails
  • VSTS

Wednesday, December 21, 2005 - Posts

GridView control didn't update or dissapeared. What gives?

This is a common issue even with the DataGrid control. PostBack is invoked and your GridView doesn't update or, in some cases, disappears. All you need to do is force the GridView to bind to its datasource by calling the DataBind() method, GridView.DataBind(), where GridView is the placeholder for the control ID of the GridView control.

R

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 21 2005, 04:56 PM by Ryan Olshan | with 1 comment(s) |
Filed under: ,
What's wrong with this generic type?

I love mysteries. However, this one is pretty simple.

Q: What is wrong with the following generic type?

VB.NET
Public Class BaseClass( Of K, V)
End Class

Public Class SubClass1
    Inherits BaseClass( Of K, V)
End Class

Public Class SubClass2
    Inherits BaseClass( Of Integer , Long )
End Class

C#
public class BaseClass  { }

public class SubClass1 : BaseClass  { }

public class SubClass2  : BaseClass < int , long > { }

A: If you were to compile the above code, the compiler would generate an error for SubClass1. SubClass1 is an open type and generates no point of reference for types K and V. SubClass2 is a constructed type and, since it has type arguments declared, will compile.

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 21 2005, 09:16 AM by Ryan Olshan | with no comments
More Posts