What is the best method to fill the GridView. using
SqlDataReader or Dataset and why

Answers were Sorted based on User's Feedback



What is the best method to fill the GridView. using SqlDataReader or Dataset and why..

Answer / justgovi

Datareader is the best way to fill the grid view.
Datareader is faster and the main purpose of it is to be
used in read only scenarios.

Is This Answer Correct ?    15 Yes 1 No

What is the best method to fill the GridView. using SqlDataReader or Dataset and why..

Answer / shiva

Depending on the requirement either we can go for Dataset
or Datareader.If the information which we are trying to
access is less then best and fastest way is to go for
Datareader in all other scenarios Dataset can be used.

Is This Answer Correct ?    10 Yes 0 No

What is the best method to fill the GridView. using SqlDataReader or Dataset and why..

Answer / gowthami

filling the grid view is good by dataset is preferable
as it is used for connection less architecture..
and dataset is nothing but a inmemory database.

Is This Answer Correct ?    9 Yes 0 No

What is the best method to fill the GridView. using SqlDataReader or Dataset and why..

Answer / saurabh sharma

If u r presenting small amount of data, u can pick any option. It will take almost same time. But if u want to load heavy data, for example 50000 rows, use sql data paging and objectdatasource or xmldatasource to fill grid view. use paging option of objectdatasource or xmldatasource to switch between pages.

Is This Answer Correct ?    0 Yes 0 No

What is the best method to fill the GridView. using SqlDataReader or Dataset and why..

Answer / vasanth

Dataset is the better option then datareader. Since dataset is disconnected, once data can be fetched and stored in dataset and then disconnect the connection and then you can bind to gridview.
In Datareader you are fetching each row and you are binding. So in middle if connection goes off, then half of the data is binded to gridview.
So dataset is better then datareader.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

C# Code for How to set readonly property to Id(database) value?

2 Answers   HCL,


Is string reference type / value type ?

7 Answers   3i Infotech, Accenture, BirlaSoft,


Classes and structs can be declared as static, is this statement true or false?

0 Answers  


Is XML case-sensitive?

3 Answers   Wipro,


How many keyword present in C# language ?

0 Answers   HCL,






What is constructors, explain with syntax

0 Answers  


What is arraylist c#?

0 Answers  


What is the difference between public, static, and void?

0 Answers  


What is the console on a mac?

0 Answers  


Is static thread safe?

0 Answers  


What is the partial class in C# What is the use of partial class in C#?

6 Answers   CTS,


Whats the use of string builder?

1 Answers   ADITI,


Categories