Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / karthikeyan

String connectionString = @"Data
Source=.\SQLExpress;Initial Catalog=Nwind;Integrated
Security=SSPI";
SqlConnection con = new SqlConnection(connectionString);
string conString = "Select * From Customers";
SqlDataAdapter dataAdpter = new SqlDataAdapter(conString,
con);
DataSet ds = new DataSet();
dataAdpter.Fill(ds);
ds.Tables[0].Columns[0].ReadOnly = true;
dataGridView1.DataSource = ds.Tables[0];

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement delegates in c#.net

1066


what is the difference between a struct and a class in c#?

1226


What are boxing and unboxing?

970


Is array passed by reference in c#?

1007


What are the main reasons to use c# language?

1001


Why we use get set property in c#?

989


What is difference between array and arraylist c#?

1128


Where’s global assembly cache located on the system?

1062


What are the different types of classes in c#?

994


What is meaning of type safety in c#?

901


What is hashset c#?

1052


Is stringbuilder thread safe c#?

936


Is array a list?

936


What is thread pooling?

1029


Explain briefly the difference between value type and reference type?

1078