How do we add customized columns in a Gridview in ASP.NET?

Make use of the TemplateField column.

What are the steps to use a checkbox in a gridview?

<ItemTemplate>
<asp:CheckBox id=”CheckBox1″ runat=”server” AutoPostBack=”True”
OnCheckedChanged=”Check_Clicked”></asp:CheckBox>
</ItemTemplate>

Difference between datagrid and GridView?

Datagrid:
1.Code requires to handle the SortCommand event and rebind grid required.
2.Code requires to handle the PageIndexChanged.
3.Need extensive code for update operation on data.
4.When compared to gridview less events supported.

GridView:
1.No code required.
2.No code required for PageIndexChanged.
3.Needs little code for update operation.
4.GridView supports events fired before and after database updates

Listview in asp.net.

ListView is a data bound control similar to DataList and DataRepeater controls but it provides edit, insert, and delete , sort operations on the data that it bounded like a GridView control. Unlike GridView control ListView gives the user full control over the rendering of the page. using templates and styles(CSS) the user can generate clean HTML UI according to his needs.

How do you hide the columns of a gridview?

By setting a column’s Visible property of a column as false or by the style display:none property.

How To Create GridView With ScrollBars?

1…….





Difference between Datalist and Gridview.

Gridview support’s selection, editing , sorting and paging whereas Datalist can’t support sorting and paging but support selection and editing