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
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.