Asp.Net Gridview : Bind Database Table

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 81

  • @CodAffection
    @CodAffection  7 ปีที่แล้ว +3

    goo.gl/bPcyXW : Buy me a Coffee
    bit.ly/30fPDMg : AspNet Core MVC Tutorials
    bit.ly/3yTsztF : More AspNet Web Form Tutorials
    bit.ly/36IA1cH : CRUD in AspNet Core MVC
    bit.ly/2Z7PI3e : CRUD in Asp Web Form
    bit.ly/2TA9N14 : GridView CRUD in Asp Web Form
    bit.ly/2Z784pi : MySQL CRUD in Asp Web Form
    bit.ly/3Z5uWUR : jQuery DataTable Playlist with Asp Web Form
    bit.ly/2MlkMuM : Login in Asp Web Form

    • @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 ปีที่แล้ว +8

    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.

  • @vidhyaarumugam341
    @vidhyaarumugam341 ปีที่แล้ว

    Thank for the video ... my job is still there for me bcaz of u people...

  • @jontelletxea809
    @jontelletxea809 3 ปีที่แล้ว +2

    You are my father! You saved my life! :)

  • @csrajeshwarrao
    @csrajeshwarrao 4 ปีที่แล้ว

    This Post may be 3 years back but it helped me. :) Thank you

  • @mglx6
    @mglx6 5 ปีที่แล้ว +2

    Thanks a lot!! from Chile

  • @barthosouza7328
    @barthosouza7328 2 ปีที่แล้ว

    Very helpful, nice explanation, thanks a lot

  • @jancsovicsmark3409
    @jancsovicsmark3409 ปีที่แล้ว

    Thank you so much! You helped me a lot! 🙂

  • @bunnygirl1615
    @bunnygirl1615 2 ปีที่แล้ว

    thank you so much it solved my biggest problem 1.4K liker congratz

  • @premsagarshukla1766
    @premsagarshukla1766 3 ปีที่แล้ว +1

    Thanks

  • @grbsql
    @grbsql 3 ปีที่แล้ว

    Thank you very much for sharing such excellent work

  • @NassosKranidiotis
    @NassosKranidiotis 6 ปีที่แล้ว +2

    Thank you very much! That was very helpful.

  • @anzimk1620
    @anzimk1620 3 ปีที่แล้ว +1

    Thankz a alot

  • @miguelrivas3781
    @miguelrivas3781 4 ปีที่แล้ว

    You are amazing, thank you for sharing this video!!

  • @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?

  • @acolad_AD
    @acolad_AD 3 ปีที่แล้ว

    nice one very helpful.

  • @yousseftiko691
    @yousseftiko691 4 ปีที่แล้ว +1

    THAANKS

  • @kennethmonteroponce8356
    @kennethmonteroponce8356 6 ปีที่แล้ว +2

    Very Good, thank you, excellent video.

    • @CodAffection
      @CodAffection  6 ปีที่แล้ว

      my pleasure. thanks for the comment.

  • @saimedianellai
    @saimedianellai 3 ปีที่แล้ว

    Thank you so much sir

  • @phamanh-cy2vb
    @phamanh-cy2vb 5 ปีที่แล้ว

    how a helpful tutorial, many thanks from Vietnam

  • @najarmahamud
    @najarmahamud 5 ปีที่แล้ว +2

    Great Tutorials :-) Tnx

  • @numanduraklar5022
    @numanduraklar5022 5 ปีที่แล้ว +2

    Thank you man!!!

  • @nickpawsey
    @nickpawsey 5 ปีที่แล้ว

    This helped a lot! Thanks man

  • @kpeando
    @kpeando 6 ปีที่แล้ว +2

    Good video , from chile

    • @CodAffection
      @CodAffection  6 ปีที่แล้ว +1

      Glad you found the video helpful.

    • @kpeando
      @kpeando 6 ปีที่แล้ว

      Thank you

  • @Buzca
    @Buzca 3 ปีที่แล้ว

    Thank you!

  • @Joyddep
    @Joyddep 5 ปีที่แล้ว

    Got what i was looking for! Thanks a lot bro :)

  • @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

  • @shaznishiraz
    @shaznishiraz 6 ปีที่แล้ว +1

    Thank You So much helped me :)

    • @CodAffection
      @CodAffection  6 ปีที่แล้ว

      glad you found the video helpful.

  • @kitsabee
    @kitsabee 3 ปีที่แล้ว

    How can I capture this value in the client side javascript?

  • @lalit7000
    @lalit7000 5 ปีที่แล้ว

    thank you... it helped me...

  • @Spirittism
    @Spirittism 4 ปีที่แล้ว

    In Windows form, there is a cell click that automatically selects all rows, is that possible in asp.net?

  • @TheSclare
    @TheSclare 7 ปีที่แล้ว

    Thank you so much.

  • @manishkumar-mu2if
    @manishkumar-mu2if 5 ปีที่แล้ว +1

    sir how to copy string connectionstring = @"?" from sql database table ?

    • @CodAffection
      @CodAffection  5 ปีที่แล้ว

      try this : th-cam.com/video/WJ-CdeTGxp8/w-d-xo.html

    • @avaniprajapati2642
      @avaniprajapati2642 5 ปีที่แล้ว

      Very easy to contact connection string

  • @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 2 ปีที่แล้ว

      it will show databound until the data you want to show has been bonded.

  • @susmitahazra1886
    @susmitahazra1886 3 ปีที่แล้ว

    Sir I need a help

  • @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 : th-cam.com/video/CtDE9gTwmyo/w-d-xo.html

  • @fahadamin7176
    @fahadamin7176 3 ปีที่แล้ว

    local host reload but grid view not showing #CodAffection

  • @burhanaditya5072
    @burhanaditya5072 7 ปีที่แล้ว +1

    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

  • @SunShine24024
    @SunShine24024 4 ปีที่แล้ว

    👍👍

  • @akhterhussain5842
    @akhterhussain5842 6 ปีที่แล้ว +1

    I need help

  • @elvingonzalez8932
    @elvingonzalez8932 5 ปีที่แล้ว

    Please do the same in a form desktop program with c# .NET only not asp.net please

  • @mickeykutti5165
    @mickeykutti5165 2 ปีที่แล้ว

    Hiii

  • @jayantacodingclass
    @jayantacodingclass 2 ปีที่แล้ว

    Gridview to textbox retrieve data -th-cam.com/video/heXzCxdQjO0/w-d-xo.html

  • @danielriojas9559
    @danielriojas9559 5 ปีที่แล้ว

    te amo

  • @vrajkuvadiya3233
    @vrajkuvadiya3233 11 หลายเดือนก่อน +1

    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 ปีที่แล้ว

    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();
    }
    }

  • @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();
    }

  • @ublweb1279
    @ublweb1279 3 ปีที่แล้ว

    Thank you very much! That was very helpful.

  • @RamdevDarak
    @RamdevDarak 3 ปีที่แล้ว

    This helped a lot! Thanks man

  • @solankidisha337
    @solankidisha337 5 ปีที่แล้ว

    Thank you so much

  • @mickeykutti5165
    @mickeykutti5165 2 ปีที่แล้ว

    I need help