🔒 Closed How to Display SQL Database into Datagridview ? Help mga kosa, ASAP!! C# Begginer

Status
Not open for further replies.

PHC - Naethan

Forum Expert
Hi mga ka PHC!! C# Begginer Help PO!! ASAP..

Pano po mag Display ng Database sa Data Gridview gamit ung Class.cs, Help ASAP!! PLzz po
1581156141966.png


1581156315132.webp



-Thank's Adv

AnonYMoozze
 
Create an sql command query. It's up to you if you use sql command string(parameterized or bare) or stored procedure. Pass the resultset into datatable or dataset, depending on how you will utilize the resultset. Lastly, bind the data/resultset to datagridview component by setting it as it's datasource. It's that easy. I'm assuming you have a knowledge about the theory of database programming. Good luck!
 
Create an sql command query. It's up to you if you use sql command string(parameterized or bare) or stored procedure. Pass the resultset into datatable or dataset, depending on how you will utilize the resultset. Lastly, bind the data/resultset to datagridview component by setting it as it's datasource. It's that easy. I'm assuming you have a knowledge about the theory of database programming. Good luck!
Pre ang hirap unawain Begginer palng hahahaha
 
Here we go again. Another spoon feed. ugh!

Code Snippet:

C#:
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Student", YourConnectionString);
DataSet ds = new DataSet();
da.Fill(ds, "YourDataSetName");
dataGridView1.DataSource = ds.Tables["YourDataSetName"].DefaultView;
Sa DataSet(); Maglalagay ako sa loob () ng Dataset Name ba dito?
Tsaka alin ung I-Dodouble Click ko, Para itype yang Code?

Salamat Boss, Sobrang laking Tulong Para maka Graduate kami 😂
 
Sa DataSet(); Maglalagay ako sa loob () ng Dataset Name ba dito?
Tsaka alin ung I-Dodouble Click ko, Para itype yang Code?

Salamat Boss, Sobrang laking Tulong Para maka Graduate kami 😂

Bahala ka jan, ang slow mo kausap. imagine graduating ka na pala hindi pa tayo nagkakaintindihan sa simpleng code snippet lang. ugh!
 
Status
Not open for further replies.

About this Thread

  • 6
    Replies
  • 511
    Views
  • 2
    Participants
Last reply from:
PHC - Naethan

Online now

Members online
1,116
Guests online
952
Total visitors
2,068

Forum statistics

Threads
2,277,021
Posts
28,973,765
Members
1,229,687
Latest member
gsby1440xd
Back
Top