.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

What tags do you need to add within the asp:datagrid tags to bind columns manually?

Posted By :nishithraj     Posted Date :December 28, 2009    Points :10   Category :ASP.Net 

You can also find related Interview Question to What tags do you need to add within the asp:datagrid tags to bind columns manually?  below: 

By Default, ASP.NET does not allow HTML tags to be sent to server via client side due to security reason. Which property needs to be set that allows HTML tags to be processed by server?

ValidateRequest Property needs to be set to false. By default it's true so it does not allow unencoded HTML tags to be processed at server. It can be set at page level or at application level via web.config. (More...)

Name the types of Columns that are available in WPF DataGrid?

1) DataGridTextColumn
2) DataGridCheckBoxColumn
3) DataGridComboBoxColumn
4) DataGridHyperlinkColumn
5) DataGridTemplateColumn

How To Place Comments Between ASP.NET Tags?


<%-- This is important column --%>


Are XML tags are case-sensitive?

Yes, XML tags are case sensitive. (More...)

What is the difference between HTML DIV and SPAN tags?

1) DIV: It is block-line and used to group larger chunks of HTML code.

SPAN: It is in-line and usually used for a small chunk of HTML code, inside a line.

2) DIV: It, itself, inserts a line break Or CR(Carriage Returns), at the starting and ending point of it.

SPAN: It does not insert any kind of line break Or CR(Carriage Returns), at the starting and/or ending point of it.

3) DIV: It has most important attributes, like: "style", "class" and "id".

SPAN: It does not have any required attributes, but the three, that are the most useful, are the same as for the DIV element, like: "style", "class" and "id".

4) DIV: Paragraph elements(

) can be put inside a DIV, but DIV can't be put inside the Paragraph elements.

SPAN: Paragraph elements(

) can't be put inside a SPAN, but SPAN can be put inside the Paragraph elements. (More...)

How to hide column/columns of silverlight/WPF datagrid?

If you want to hide column or columns in datagrid in code behind then do the following steps:

dgSample.Columns[0].Visibility = Visibility.Hidden;

Note: Rename dgSample to your datagrid name.

What is Method used to bind the data into gridview ?

DataBind() Method used to bind the data into gridview (More...)

What is the Difference between #Bind and #Eval ?

Eval is read only. Bind is 2 way binding(updatable) (More...)

Difference between DataGrid, DataLsit and Repeater?

Difference between DataGrid, DataLsit and Repeater?


1) DataGird has a in-built Support for Sort, Filter, and Paging the Data.

2) Each Row in DataGrid is displayed as a row in the table.

3) It has an AutoGenarateColumn Property, which can be set to either True or False.
Default property is true.

4) DataGrid has predefined Editing Controls.

5)Following are the DataGrid Data Control Styles:

i. AlternatingItemStyle
ii. EditItemStyle
iii. FooterStyle
iv. HeaderStyle
v. ItemStyle
vi. SelectedItemStyle
vii. PagerStyle

6) Following are the DataGrid Data Control Templates(only supported by the TemplateColumna) :

i. HeaderTemplate
ii. ItemTemplate
iii. EditItemTemplate
iv. FooterTemplate (More...)

What's difference between Datagrid, Datalist and repeater ?

A Datagrid, Datalist and Repeater are all ASP.NET data Web controls.

They have many things in common like DataSource Property, DataBind Method ItemDataBound and ItemCreated.

When you assign the DataSource Property of a Datagrid to a DataSet then each DataRow present in the DataRow Collection of DataTable is assigned to a corresponding DataGridItem and this is same for the rest of the two controls also. But The HTML code generated for a Datagrid has an HTML TABLE element created for the particular DataRow and its a Table form representation with Columns and Rows.

For a Datalist it''''s an Array of Rows and based on the Template Selected and the RepeatColumn Property value We can specify how many DataSource records should appear per HTML row. In hort in datagrid we have one record per row, but in datalist we can have five or six rows per row.

For a Repeater Control, the Datarecords to be displayed depends upon the Templates specified and the only HTML generated is the due to the Templates.

In addition to these, Datagrid has a in-built support for Sort, Filter and paging the Data, which is not possible when using a DataList and for a Repeater Control we would require to write an explicit code to do paging. (More...)

How to decide on the design consideration to take a Datagrid, datalist or repeater ?

Many make a blind choice of choosing datagrid directly, but that's not the right way.

Datagrid provides ability to allow the end-user to sort, page, and edit its data. But it comes at a cost of speed. Second the display format is simple that is in row and columns. Real life scenarios can be more demanding that

With its templates, the DataList provides more control over the look and feel of the displayed data than the DataGrid.

It offers better performance than datagrid Repeater control allows for complete and total control. With the Repeater, the only HTML emitted are the values of the databinding statements in the templates along with the HTML markup specified in the templates-no "extra" HTML is emitted, as with the DataGrid and DataList. By requiring the developer to specify the complete generated HTML markup, the Repeater often requires the longest development time. But repeater does not provide editing features like datagrid so everything has to be coded by programmer. However, the Repeater does boast the best performance of the three data Web controls. Repeater is fastest followed by Datalist and finally datagrid. (More...)

How to clear a datagrid on a button click?

You need to Clear the DataSource of the dadaGrid.
So try this: dataSet1.Clear();
dataGrid1.DataSource = dataSet1.TableNameHere.DefaultView;
C#: dataGrid1.DataSource = null;
VB: dataGrid1.DataSource = nothing (More...)

How many Columns per INSERT statement is allowed

4096 Columns allowed in per Insert SQL (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend