Asp.Net Gridview : Bind Database Table

  Рет қаралды 238,146

CodAffection

CodAffection

7 жыл бұрын

How to Bind Database Table in Asp.Net Gridview
In this video, we have discussed how to bind or display database table in asp.net gridview using SQL Server. In the last column, we have shown a link button to select a row.
📂 GitHub Repository
► goo.gl/z4nwbc
💖 Buy me a Coffee
➤ bit.ly/3L36ut4 (PayPal)
➤ bit.ly/3VF0iPT (Razorpay)
🌀 Related Videos
goo.gl/oxDoDK : Asp.Net - Insert Update Delete
goo.gl/qshuJk : Complete Asp.net Tutorial
goo.gl/TUhsm5 : Asp.net Login Page
goo.gl/ySUFf8 : Similar Mvc Tutorials
goo.gl/3ajHuA : Similar C# Video Tutorials
goo.gl/yHZcCo : Build Complete Asp.Net MVC App
goo.gl/ZXKqT9 : jQuery Ajax in Asp.net MVC
🔗 Find me in
Udemy : bit.ly/3RtyQSB
Facebook : / codaffection
GitHub : github.com/codaffection
Discord : / discord
Twitter : / codaffection
#AspNet #CodAffection

Пікірлер: 81
@CodAffection
@CodAffection 7 жыл бұрын
goo.gl/RFY5C2 : Subscribe to CodAffection goo.gl/oxDoDK : Asp.Net CRUD Operations goo.gl/sdqHqu : Asp.Net Login Page goo.gl/UoNfs4 : Asp.Net Grid Inline CRUD
@coledalton5581
@coledalton5581 3 жыл бұрын
i know Im kinda randomly asking but do anyone know of a good website to stream newly released series online ?
@zevsawyer7457
@zevsawyer7457 3 жыл бұрын
@Cole Dalton Try FlixZone. Just google for it :)
@malcolmvivaan7841
@malcolmvivaan7841 3 жыл бұрын
@Zev Sawyer Definitely, been using flixzone for since april myself =)
@coledalton5581
@coledalton5581 3 жыл бұрын
@Zev Sawyer thank you, signed up and it seems like they got a lot of movies there :) I appreciate it !!
@zevsawyer7457
@zevsawyer7457 3 жыл бұрын
@Cole Dalton Happy to help :D
@fabiandibia1858
@fabiandibia1858 5 жыл бұрын
One of the best Online tutorial I have ever seen. Not too great English but the message was crystal clear. Well delivered and Thank you for this.
@CodAffection
@CodAffection 5 жыл бұрын
glad you found the video helpful.
@csrajeshwarrao
@csrajeshwarrao 4 жыл бұрын
This Post may be 3 years back but it helped me. :) Thank you
@Joyddep
@Joyddep 5 жыл бұрын
Got what i was looking for! Thanks a lot bro :)
@NassosKranidiotis
@NassosKranidiotis 5 жыл бұрын
Thank you very much! That was very helpful.
@nickpawsey
@nickpawsey 4 жыл бұрын
This helped a lot! Thanks man
@mglx6
@mglx6 5 жыл бұрын
Thanks a lot!! from Chile
@najarmahamud
@najarmahamud 5 жыл бұрын
Great Tutorials :-) Tnx
@miguelrivas3781
@miguelrivas3781 3 жыл бұрын
You are amazing, thank you for sharing this video!!
@lalit7000
@lalit7000 5 жыл бұрын
thank you... it helped me...
@grbsql
@grbsql 3 жыл бұрын
Thank you very much for sharing such excellent work
@barthosouza7328
@barthosouza7328 2 жыл бұрын
Very helpful, nice explanation, thanks a lot
@Buzca
@Buzca 3 жыл бұрын
Thank you!
@solankidisha337
@solankidisha337 4 жыл бұрын
Thank you so much
@phamanh-cy2vb
@phamanh-cy2vb 5 жыл бұрын
how a helpful tutorial, many thanks from Vietnam
@CodAffection
@CodAffection 5 жыл бұрын
you are welcome.
@acolad_AD
@acolad_AD 3 жыл бұрын
nice one very helpful.
@numanduraklar5022
@numanduraklar5022 5 жыл бұрын
Thank you man!!!
@CodAffection
@CodAffection 5 жыл бұрын
you are welcome.
@yousseftiko691
@yousseftiko691 4 жыл бұрын
THAANKS
@shaznishiraz
@shaznishiraz 6 жыл бұрын
Thank You So much helped me :)
@CodAffection
@CodAffection 6 жыл бұрын
glad you found the video helpful.
@kennethmonteroponce8356
@kennethmonteroponce8356 5 жыл бұрын
Very Good, thank you, excellent video.
@CodAffection
@CodAffection 5 жыл бұрын
my pleasure. thanks for the comment.
@saimedianellai
@saimedianellai 2 жыл бұрын
Thank you so much sir
@jontelletxea809
@jontelletxea809 3 жыл бұрын
You are my father! You saved my life! :)
@vidhyaarumugam341
@vidhyaarumugam341 10 ай бұрын
Thank for the video ... my job is still there for me bcaz of u people...
@TheSclare
@TheSclare 6 жыл бұрын
Thank you so much.
@CodAffection
@CodAffection 6 жыл бұрын
My Pleasure.
@marrohom5
@marrohom5 2 жыл бұрын
Thats great!, I have a doubt, how can I assign an ID to the table generated, I would like to add styles on it with JS... Thanks
@jancsovicsmark3409
@jancsovicsmark3409 Жыл бұрын
Thank you so much! You helped me a lot! 🙂
@CodAffection
@CodAffection Жыл бұрын
Glad I could help!
@premsagarshukla1766
@premsagarshukla1766 2 жыл бұрын
Thanks
@anzimk1620
@anzimk1620 3 жыл бұрын
Thankz a alot
@TheYosi277
@TheYosi277 Жыл бұрын
you recommended to do the SQL class you did as a static class so i wont create a instence of the data base every function?
@Spirittism
@Spirittism 3 жыл бұрын
In Windows form, there is a cell click that automatically selects all rows, is that possible in asp.net?
@kpeando
@kpeando 6 жыл бұрын
Good video , from chile
@CodAffection
@CodAffection 6 жыл бұрын
Glad you found the video helpful.
@kpeando
@kpeando 6 жыл бұрын
Thank you
@kitsabee
@kitsabee 2 жыл бұрын
How can I capture this value in the client side javascript?
@bunnygirl1615
@bunnygirl1615 Жыл бұрын
thank you so much it solved my biggest problem 1.4K liker congratz
@CodAffection
@CodAffection Жыл бұрын
😊
@siddanatibhargav3070
@siddanatibhargav3070 5 жыл бұрын
hey hello bro in sql we write a qurey like select column1,column2,... tablename where column4=data; it gives the data in table when column is a country name is equal to india then it gives all columns have country is india it gives that data.but how to implement in asp.net i mean when user given a input that input is accepted by the database and give r display the data. how to work with this in asp.net
@CodAffection
@CodAffection 5 жыл бұрын
hope I understood your question. you can stored procedure with parameter. you can see them here : kzbin.info/www/bejne/eaWndmydidygr9E
@manishkumar-mu2if
@manishkumar-mu2if 5 жыл бұрын
sir how to copy string connectionstring = @"?" from sql database table ?
@CodAffection
@CodAffection 5 жыл бұрын
try this : kzbin.info/www/bejne/jXuQdJebiayrppo
@avaniprajapati2642
@avaniprajapati2642 5 жыл бұрын
Very easy to contact connection string
@SunShine24024
@SunShine24024 3 жыл бұрын
👍👍
@akhterhussain5842
@akhterhussain5842 6 жыл бұрын
I need help
@elvingonzalez8932
@elvingonzalez8932 4 жыл бұрын
Please do the same in a form desktop program with c# .NET only not asp.net please
@mickeykutti5165
@mickeykutti5165 2 жыл бұрын
When I click the design button all columns are displaying like databound databound..... What's the error plz help me
@tanujgarg792
@tanujgarg792 Жыл бұрын
it will show databound until the data you want to show has been bonded.
@fahadamin7176
@fahadamin7176 3 жыл бұрын
local host reload but grid view not showing #CodAffection
@susmitahazra1886
@susmitahazra1886 3 жыл бұрын
Sir I need a help
@danielriojas9559
@danielriojas9559 4 жыл бұрын
te amo
@burhanaditya5072
@burhanaditya5072 7 жыл бұрын
Can you do it with innerjoin table sir?
@CodAffection
@CodAffection 7 жыл бұрын
sure, mention column name from join result
@burhanaditya5072
@burhanaditya5072 7 жыл бұрын
Dotnet Mob I still have trouble. When operating a crud with an innerjoin table. Whether the actual innerjoin requires a key relationship? Maybe next time you can explain it?
@CodAffection
@CodAffection 7 жыл бұрын
Yes. SELECT * FROM table as t1 INNER JOIN table as t2 ON t1.Key = t2.Key
@burhanaditya5072
@burhanaditya5072 7 жыл бұрын
Dotnet Mob Can inner join be done by using stored procedure only? I've been doing innerjoin with view options
@CodAffection
@CodAffection 7 жыл бұрын
sure
@mickeykutti5165
@mickeykutti5165 2 жыл бұрын
Hiii
@jayantacodingclass
@jayantacodingclass 2 жыл бұрын
Gridview to textbox retrieve data -kzbin.info/www/bejne/npa7q3aumbadhZI
@vrajkuvadiya3233
@vrajkuvadiya3233 7 ай бұрын
speak slowly
@MK-kl4es
@MK-kl4es Жыл бұрын
13 protected void Page_Load(object sender, EventArgs e) { table.Columns.Add("1", typeof(int)); table.Columns.Add("2", typeof(string)); table.Columns.Add("3", typeof(string)); table.Columns.Add("3", typeof(string)); table.Columns.Add("4", typeof(string)); table.Columns.Add("5", typeof(string)); table.Columns.Add("6", typeof(string)); string path = Server.MapPath("~/text/people.txt"); string[] dataa = File.ReadAllLines(ppath); foreach (string p in dataa) { string[] kolone = p.Split(';'); table.Rows.Add(kolone); } GridView1.DataSource = table; GridView1.DataBind(); List place = new List(); foreach (string p in dataa) { string[] rows = p.Split(';'); place.Add(rows[6]); } DropDownList1.Items.Add(new ListItem(String.Empty, "-1")); foreach (string m in place) { ListItem item = new ListItem(m); if (!DropDownList1.Items.Contains(item)) { DropDownList1.Items.Add(item); } } } protected void Button1_Click(object sender, EventArgs e) { DataTable temp = table.Copy(); for (int i = 0; i < temp.Rows.Count; i++) { if (!temp.Rows[i][1].ToString().Contains(TextBox1.Text) || !temp.Rows[i][2].ToString().Contains(TextBox2.Text) || !temp.Rows[i][3].ToString().Contains(TextBox3.Text) || !temp.Rows[i][4].ToString().Contains(TextBox4.Text) || !temp.Rows[i][5].ToString().Contains(TextBox5.Text) || !temp.Rows[i][6].ToString().Contains(DropDownList1.SelectedItem.Text)) { temp.Rows.RemoveAt(i); i--; } } GridView1.DataSource = temp; GridView1.DataBind(); }
@MK-kl4es
@MK-kl4es Жыл бұрын
78 protected void insert() { XmlTextReader reader = new XmlTextReader(Server.MapPath("/XMLL/XMLFile1.xml")); DataSet ds = new DataSet(); ds.ReadXml(reader); DataView dv = new DataView(ds.Tables[0]); DataTable dt = dv.Table; dt.DefaultView.Sort = "citano DESC"; dt = dt.DefaultView.ToTable(true); reader.Close(); GridView1.DataSource = dt; GridView1.DataBind(); } SqlConnection con = new SqlConnection(""); protected void btnPosalji_Click(object sender, EventArgs e) { SqlCommand com = new SqlCommand("INSERT INTO table values(@item1, @item2, @item3, @item4)", con); com.Parameters.AddWithValue("@item1", tb1.Text); com.Parameters.AddWithValue("@item2", tb2.Text); com.Parameters.AddWithValue("@item3", tb3.Text); com.Parameters.AddWithValue("@item4", DateTime.Now.ToShortDateString()); con.Open(); com.ExecuteNonQuery(); }
@MK-kl4es
@MK-kl4es Жыл бұрын
15 public void insert() { if (DropDownList1.SelectedIndex > -1) { string pathh= Server.MapPath($"~/TXT/{DropDownList1.SelectedValue}.txt"); string[] liness = File.ReadAllLines(putanja); foreach (string line in liness) { if (line.StartsWith("SMER")) { string smer = line.Remove(0, 5); DropDownList2.Items.Add(smer); } } } } protected void Button1_Click(object sender, EventArgs e) { GridView1.DataSource = null; GridView1.DataBind(); DataSet ds = new DataSet(); ds.Tables.Add(new DataTable()); ds.Tables.Add(new DataTable()); ds.Tables[0].Columns.Add("RBR", typeof(string)); ds.Tables[0].Columns.Add("Polazak", typeof(string)); ds.Tables[1].Columns.Add("RBR", typeof(string)); ds.Tables[1].Columns.Add("Polazak", typeof(string)); if (DropDownList1.SelectedIndex > -1 && DropDownList2.SelectedIndex > -1) { string pathh = Server.MapPath($"~/TXT/{DropDownList1.SelectedValue}.txt"); string[] liness = File.ReadAllLines(pathh); int i = -1, j = 0; foreach (string line in liness) { if (line.StartsWith("SMER")) { i++; j = 0; } else { j++; ds.Tables[i].Rows.Add(j, line); } } if (DropDownList2.SelectedIndex == 0) { GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } else if (DropDownList2.SelectedIndex == 1) { GridView1.DataSource = ds.Tables[1]; GridView1.DataBind(); } }
@RamdevDarak
@RamdevDarak 3 жыл бұрын
This helped a lot! Thanks man
@ublweb1279
@ublweb1279 3 жыл бұрын
Thank you very much! That was very helpful.
@mickeykutti5165
@mickeykutti5165 2 жыл бұрын
I need help
C# Asp.Net Gridview - Insert Update and Delete With SQL Server
34:06
Asp.Net MVC CRUD Operations Using Datatable
1:00:51
CodAffection
Рет қаралды 383 М.
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН
C# Asp.Net - User Registration Or Sign Up With SQL Server
33:22
CodAffection
Рет қаралды 199 М.
Asp.Net Gridview Tutorial - Bind Database Table To Gridview - Tutorial 1
13:29
Coding Solutions With Ankit
Рет қаралды 9 М.
Gridview Examples in ASP.net-part 1
14:03
Kannababu Banna
Рет қаралды 26 М.
ASP.NET - GridView Control
6:46
TutorialsPoint
Рет қаралды 25 М.
Insert, Edit, Update, Delete Data in GridView Using Asp.Net C# | Hindi | Free Online Classes
28:56
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН