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


Top 5 Contributors of the Month
david stephan

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

How to clear all rows of the GridView?

Posted By :Syed Shakeer Hussain     Posted Date :March 14, 2009    Points :10   Category :ADO.Net 
make DataSource as null.

GridView1.DataSource = null;

You can also find related Interview Question to How to clear all rows of the GridView?  below: 

What is Method used to bind the data into gridview ?

  
DataBind() Method used to bind the data into gridview (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;
or
C#: dataGrid1.DataSource = null;
VB: dataGrid1.DataSource = nothing (More...)

What is the difference between Session.Abandon() and Session.Clear()?

  
The major practical difference is that if you call Session.Abandon(), Session_End will be fired (for InProc mode), and in the next request, Session_Start will be fired. Session.Clear( ) just clears the session data without killing it.

Ragards
Santosh
http://santoshdotnetarena.blogspot.com/ (More...)

What is the difference between Session.Clear() and Session.RemoveAll() method?

  
Well, actually there is no difference. Session.RemoveAll() methods internally makes a call to Clear() method only.

Thanks. (More...)

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. (More...)

What is the difference between Session.Abandon() and Session.Clear()?

  
Session.Abandon() will end current session by firing Session_End and in the next request, Session_Start will be fire.

Session.Clear( ) just clears the session data without killing it. With session.clear variable is not removed from memory it just like giving value null to this session.

Session ID will remain same in both cases, as long as the browser is not closed. (More...)

How many ways return rows from one table not in another table?

  
There are at least 5 ways to return data from one table which is not in another table. Two of these are SQL Server 2005 and greater only

1)NOT IN

2)NOT EXISTS

3)LEFT and RIGHT JOIN

4)OUTER APPLY (2005+)

5)EXCEPT (2005+)

(More...)

Deleting Duplicates rows from the table?

  
delete from Employee where(EmpId Not In(Select Max(EmpId) from Employee Group By EmpName
-------------------------------
Note: EmpId Should Be identity column means Autogenerated column (More...)

What is the limitation of Rows and Columns in Sql Server?

  
A Row in Sql Server can have the maximum capacity of 8080bytes.
A Column in Sql Server can have the maximum capacity of 1789bytes. (More...)

How To Create GridView With ScrollBars?

  
1.......




2............



(More...)

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

(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