By default width of column handled automatically, means columns in Gridview control are sized automaticlaly internally column cells redered as HTML cell. On the basis of requirement one can set the width dynamically also.
Following are the steps to do it;
1. Setting Column Width Dynamically:
Through code, set the width property on the ItemStyle of GridView.
Following is the code-snippet for the same:
VB.NEt:
[CODE]
Dim intColWidth As Integer = 25
GridView1.Columns(0).ItemStyle.Width = intColWidth
[/CODE]
C#:
[CODE]
int intColWidth = 25;
GridView1.Columns(0).ItemStyle.Width = intColWidth;
[/CODE]
2. Setting Column width as per Data-Content :
Write following piece of code in RowDataBound handler / event:
Note: Code is …
No, you can’t the signature of the virtual method must remain the same, only the keyword ‘virtual is changed to keyword override’.
Tweet This Post
In overriding, you change the method behavior for a derived class.
While, overloading simply involves having a method with the same name within the class.
Tweet This Post
System.object
Tweet This Post
The method can be over-ridden.
Tweet This Post