Asp.Net Gridview : Bind Database Table

Поделиться
HTML-код
  • Опубликовано: 26 окт 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.

  • @jontelletxea809
    @jontelletxea809 3 года назад +2

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

  • @vidhyaarumugam341
    @vidhyaarumugam341 Год назад

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

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

  • @bunnygirl1615
    @bunnygirl1615 2 года назад

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

  • @barthosouza7328
    @barthosouza7328 2 года назад

    Very helpful, nice explanation, thanks a lot

  • @jancsovicsmark3409
    @jancsovicsmark3409 Год назад

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

  • @ublweb1279
    @ublweb1279 3 года назад

    Thank you very much! That was very helpful.

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

  • @grbsql
    @grbsql 3 года назад

    Thank you very much for sharing such excellent work

  • @RamdevDarak
    @RamdevDarak 3 года назад

    This helped a lot! Thanks man

  • @kennethmonteroponce8356
    @kennethmonteroponce8356 5 лет назад +2

    Very Good, thank you, excellent video.

    • @CodAffection
      @CodAffection  5 лет назад

      my pleasure. thanks for the comment.

  • @miguelrivas3781
    @miguelrivas3781 3 года назад

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

  • @acolad_AD
    @acolad_AD 3 года назад

    nice one very helpful.

  • @phamanh-cy2vb
    @phamanh-cy2vb 5 лет назад

    how a helpful tutorial, many thanks from Vietnam

  • @najarmahamud
    @najarmahamud 5 лет назад +2

    Great Tutorials :-) Tnx

  • @kpeando
    @kpeando 6 лет назад +2

    Good video , from chile

    • @CodAffection
      @CodAffection  6 лет назад +1

      Glad you found the video helpful.

    • @kpeando
      @kpeando 6 лет назад

      Thank you

  • @Joyddep
    @Joyddep 5 лет назад

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

  • @anzimk1620
    @anzimk1620 3 года назад +1

    Thankz a alot

  • @numanduraklar5022
    @numanduraklar5022 5 лет назад +2

    Thank you man!!!

  • @premsagarshukla1766
    @premsagarshukla1766 3 года назад +1

    Thanks

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

  • @yousseftiko691
    @yousseftiko691 4 года назад +1

    THAANKS

  • @saimedianellai
    @saimedianellai 3 года назад

    Thank you so much sir

  • @Buzca
    @Buzca 3 года назад

    Thank you!

  • @shaznishiraz
    @shaznishiraz 6 лет назад +1

    Thank You So much helped me :)

  • @solankidisha337
    @solankidisha337 5 лет назад

    Thank you so much

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

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

  • @kitsabee
    @kitsabee 3 года назад

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

  • @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 : ruclips.net/video/CtDE9gTwmyo/видео.html

  • @manishkumar-mu2if
    @manishkumar-mu2if 5 лет назад +1

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

    • @CodAffection
      @CodAffection  5 лет назад

      try this : ruclips.net/video/WJ-CdeTGxp8/видео.html

    • @avaniprajapati2642
      @avaniprajapati2642 5 лет назад

      Very easy to contact connection string

  • @jayantacodingclass
    @jayantacodingclass 2 года назад

    Gridview to textbox retrieve data -ruclips.net/video/heXzCxdQjO0/видео.html

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

  • @elvingonzalez8932
    @elvingonzalez8932 5 лет назад

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

  • @susmitahazra1886
    @susmitahazra1886 3 года назад

    Sir I need a help

  • @fahadamin7176
    @fahadamin7176 3 года назад

    local host reload but grid view not showing #CodAffection

  • @mickeykutti5165
    @mickeykutti5165 2 года назад

    I need help

  • @SunShine24024
    @SunShine24024 4 года назад

    👍👍

  • @mickeykutti5165
    @mickeykutti5165 2 года назад

    Hiii

  • @vrajkuvadiya3233
    @vrajkuvadiya3233 10 месяцев назад +1

    speak slowly

  • @danielriojas9559
    @danielriojas9559 5 лет назад

    te amo

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

  • @NassosKranidiotis
    @NassosKranidiotis 6 лет назад +2

    Thank you very much! That was very helpful.

  • @nickpawsey
    @nickpawsey 5 лет назад

    This helped a lot! Thanks man

  • @TheSclare
    @TheSclare 6 лет назад

    Thank you so much.

  • @akhterhussain5842
    @akhterhussain5842 6 лет назад +1

    I need help