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

Is c# an open source language?

997


What are Memory foot print of an exe?

1024


What is cshtml?

1031


What is the root element of an xml file?

870


Define an assembly in .net?

962


what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?

1889


Why should I use interface in c#?

971


What is lock in c#?

908


How are methods overloaded?

999


Why do we need reflection in c#?

915


What is multicast delegate explain with example?

1000


What is void in c#?

943


Can we inherit partial class in c#?

942


What is the difference between string and string in c#?

984


What is difference between array and collection in c#?

885