C# Tutorial 21: Display selected row from datagridview to TextBox in C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • ★★★Top Online Courses From ProgrammingKnowledge ★★★
    Python Programming Course ➡️ bit.ly/2vsuMaS ⚫️ bit.ly/2GOaeQB
    Java Programming Course ➡️ bit.ly/2GEfQMf ⚫️ bit.ly/2Vvjy4a
    Bash Shell Scripting Course ➡️ bit.ly/2DBVF0C ⚫️ bit.ly/2UM06vF
    Linux Command Line Tutorials ➡️ bit.ly/2IXuil0 ⚫️ bit.ly/2IXukt8
    C Programming Course ➡️ bit.ly/2GQCiD1 ⚫️ bit.ly/2ZGN6ej
    C++ Programming Course ➡️ bit.ly/2V4oEVJ ⚫️ bit.ly/2XMvqMs
    PHP Programming Course ➡️ bit.ly/2XP71WH ⚫️ bit.ly/2vs3od6
    Android Development Course ➡️ bit.ly/2UHih5H ⚫️ bit.ly/2IMhVci
    C# Programming Course ➡️ bit.ly/2Vr7HEl ⚫️ bit.ly/2W6RXTU
    JavaFx Programming Course ➡️ bit.ly/2XMvZWA ⚫️ bit.ly/2V2CoAi
    NodeJs Programming Course ➡️ bit.ly/2GPg7gA ⚫️ bit.ly/2GQYTQ2
    Jenkins Course For Developers and DevOps ➡️ bit.ly/2Wd4l4W ⚫️ bit.ly/2J1B1ug
    Scala Programming Tutorial Course ➡️ bit.ly/2PysyA4 ⚫️ bit.ly/2PCaVj2
    Bootstrap Responsive Web Design Tutorial ➡️ bit.ly/2DFQ2yC ⚫️ bit.ly/2VoJWwH
    MongoDB Tutorial Course ➡️ bit.ly/2LaCJfP ⚫️ bit.ly/2WaI7Ap
    QT C++ GUI Tutorial For Beginners ➡️ bit.ly/2vwqHSZ
    ★★★ Online Courses to learn ★★★
    Get 2 FREE Months of Unlimited Classes from skillshare - skillshare.eqc...
    Data Science - bit.ly/2lD9h5L | bit.ly/2lI8wIl
    Machine Learning - bit.ly/2WGGQpb | bit.ly/2GghLXX
    Artificial Intelligence - bit.ly/2lYqaYx | bit.ly/2NmaPya
    MERN Stack E-Degree Program - bit.ly/2kx2NFe | bit.ly/2lWj4no
    DevOps E-degree - bit.ly/2k1PwUQ | bit.ly/2k8Ypfy
    Data Analytics with R - bit.ly/2lBKqz8 | bit.ly/2lAjos3
    AWS Certification Training - bit.ly/2kmLtTu | bit.ly/2lAkQL1
    Projects in Java - bit.ly/2kzn25d | bit.ly/2lBMffs
    Machine Learning With TensorFlow - bit.ly/2m1z3AF | bit.ly/2lBMhnA
    Angular 8 - Complete Essential Guide - bit.ly/2lYvYRP
    Kotlin Android Development Masterclass - bit.ly/2GcblsI
    Learn iOS Programming Building Advance Projects - bit.ly/2kyX7ue
    ★★★ Follow ★★★
    My Website - www.codebind.com
    DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
    Moving Datarow from datagridview to textboxes‎
    Passing data from selected row in DataGridView to
    c# - how to load selected data from database and display in textbox
    How to show gridview column data in a textbox‎
    c# - Getting data from selected datagridview row and which event
    How to retrive data from gridview to textbox by selecting one row
    DataGridView selected row data to textbox in C#.net
    how to retrieve data and display in textbox in c#
    Passing gridview values(data) to textbox fields
    how to get selected row values from a Gridview control

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

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

    Thank you very much for your help. You helped me with my coursework. Greetings from Belarus

  • @pyrkhatlangwardkhar5405
    @pyrkhatlangwardkhar5405 9 ปีที่แล้ว +2

    good work u had done Sir....but my problem i face i want to display in comboboxes when i select from datagridview

  • @chipenembe
    @chipenembe 10 ปีที่แล้ว +3

    how can i do the same using radio button...?please help

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

    Bro, how to remove the blank part at left of your datagridview

  • @StigSalskovIversen
    @StigSalskovIversen 11 ปีที่แล้ว

    Thanks for the video. This example works better if you use this event instead:
    private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)

  • @josegarcia-th3pj
    @josegarcia-th3pj 2 ปีที่แล้ว

    I made it, but sometimes I pick something on the dataGridView and does not turn the text boxes
    Did you change some properties of the DatagridViex

  • @Olegmilosevic1
    @Olegmilosevic1 9 ปีที่แล้ว +1

    How to do that with a button and label, u click button name mark age, and label shows marks age? does someone know i need that explanation.

  • @chevaugn
    @chevaugn 9 ปีที่แล้ว

    Suppose I wanted to display the selected row into textboxes from a different form in my project. How would go about that.

  • @Allan_Ralph
    @Allan_Ralph 4 ปีที่แล้ว +2

    If you are Unable to Select the First Row or Field , Change the IF condtion from
    if (e.RowIndex > 0)
    {
    }
    to
    if (e.RowIndex > -1)

  • @JunLee000
    @JunLee000 8 ปีที่แล้ว

    I have a problem with this relating on dataTimePicker it doesn't show and it has an error
    dateTimePicker1.Text = row.Cells["dob"].Value.ToString();

  • @heraNbUdDHikA
    @heraNbUdDHikA 10 ปีที่แล้ว

    Thank you so much.Keep it up.Your tutorials are always helpful

  • @howertor
    @howertor 10 ปีที่แล้ว +1

    This series is great! Can you please send me the completed project for all of this series? I would like to look at it.
    Thank you for the Help!

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

      he's already ded

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

      @@Its_Aru what !!!!

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

      @@yadneshbapat7825 yes

  • @gallardosla
    @gallardosla 10 ปีที่แล้ว

    Hi, do you know how to display timestamp type from sql in datagridview?

  •  11 ปีที่แล้ว +1

    I have faced with the same problem. Even though I couldn't understand why it couldn't find the name of the cell, I solved my problem with using Index Numbers of those columns. The first column in left in DataGridView has Index 0. By calculating this, you can find every column's index.

    • @gielynfernandez163
      @gielynfernandez163 7 หลายเดือนก่อน +1

      thank you for this

    •  7 หลายเดือนก่อน

      @@gielynfernandez163 glad it's helpful, i don't even know what i wrote since it is from 10 years ago :)

  • @matheshwaran602
    @matheshwaran602 10 ปีที่แล้ว

    nice video..The same way how to set a check box and select a cells and delete it??
    i tried that but shows when i can't click it...help me i look fwd to that

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

    I need help i have one table with one column with name Date with datatype date and in the datagridview is fine but when i select the information it go to the textbox, and them appear in the colum date the normal date and appear the hour, how i remove the hour?

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

    I need opposite of it. Can we do like, write an Id in textbox and when we search for it in database, the corresponding row gets selected in datagridview

  • @JIyHaTuK94
    @JIyHaTuK94 8 ปีที่แล้ว

    how do i type for radiobutton , then i select the cell , for example , Genre , i want to check radiobutton, please help

  • @jamunarani.s2161
    @jamunarani.s2161 3 ปีที่แล้ว

    Sir if i need to get date what we need to use

  • @bariqnet
    @bariqnet 11 ปีที่แล้ว

    thank you very much i spent all the day looking for this method .... thanks :)

  • @kjagal
    @kjagal 11 ปีที่แล้ว

    i am trying to type information in different cell blocks and have all the info shown either inside a textbox (non-editable) or ?? ....
    what's the code for that plz .

  • @xoman5144
    @xoman5144 11 ปีที่แล้ว

    You're a life saver man.

  • @harrypatel4030
    @harrypatel4030 8 ปีที่แล้ว

    i am working in wpf and it doesn't have a Row element? Can someone help?

  • @MrEzBiE
    @MrEzBiE 8 ปีที่แล้ว

    His English is good even though he has an accent. I skip most of the Indian programming videos because they sound incomprehensible, but this one is just very good.

  • @snash367
    @snash367 10 ปีที่แล้ว +1

    Your tutorials will do a great service if you will be able to explain why you have done such things and the reason instead of just telling what you have done in your programme. Pointing the mouse cursor on a code and telling what you have done doesn't make a tutorial . Anyway appreciate your try.

  • @jfogbank23
    @jfogbank23 11 ปีที่แล้ว

    Hi.. I love your videos, they have helped me so much. I am trying to do something very similar to this where basically I can double click a record from datagridview and have it open a new form that contains all the labels and text boxes. Could you help me? Also, is that possible in java too? Thanks!

  • @chavezRestricted
    @chavezRestricted 11 ปีที่แล้ว

    I have trouble getting the data with ID and AGE column, columns and last name I have no problem just that it does or very slow or sometimes cops. teacher will have some solution?

  • @ВикторКомаров-ж1щ
    @ВикторКомаров-ж1щ 2 ปีที่แล้ว +1

    Лайк, мне очень помог твой урок по C#!

  • @kathleenramirez1354
    @kathleenramirez1354 8 ปีที่แล้ว

    i need help how to select listview item? // withot data base

  • @PMWebTutorials
    @PMWebTutorials 11 ปีที่แล้ว

    how is it possible to show data in datagridview by selecting multiple values choosing from checked listbox in c#? help needed

  • @edward910401
    @edward910401 10 ปีที่แล้ว

    how about datagridview to datetimepicker?

  • @chavezRestricted
    @chavezRestricted 11 ปีที่แล้ว

    en el metodo load_Table() tienes que cambiar también el nombre por el que usas para pasar los parametros al textbox

  • @TheGojkoSisa
    @TheGojkoSisa 11 ปีที่แล้ว

    Problem: you use CellContentClick event and if you miss content of cell eventhandler isn't called
    Solution: instead of CellContentClick event use CellClick event.

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

    class System.Windows.Forms.DataGridViewRow
    Represents a row in a DataGridView control.
    'DataGridViewRow' is a type but is use like a variable
    Could someone explain? ( I am a bad programmer )

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

    merci that's worked xD

  • @aflacsoup69
    @aflacsoup69 10 ปีที่แล้ว

    great tutorial thanks for the help I am new at this

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

    how to use this in image type? thank you

  • @avinashreddy2927
    @avinashreddy2927 10 ปีที่แล้ว

    it's useful and saves time..

  • @patrickfuertes5624
    @patrickfuertes5624 10 ปีที่แล้ว

    Hello there. I have an error when i tried this code. The error says that Column Name cannot be found even though I put inside is correct. What should I do. Badly need your help guys.

    • @tahmaseb12
      @tahmaseb12 9 ปีที่แล้ว

      You must enter the names of Columns in your Database, for example "ID" is the name of first column in my Database:
      ID4_txtbox.Text = row.Cells["ID"].Value.ToString();

  • @timonkrebs6978
    @timonkrebs6978 10 ปีที่แล้ว

    Thank You Very Much!!!

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

    There is no row at position o means

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

    How to update selected datagridview row?

  • @RafaelSLew
    @RafaelSLew 10 ปีที่แล้ว

    Very good!! Thank you!

  • @luzautiluminacionautomotri8772
    @luzautiluminacionautomotri8772 11 ปีที่แล้ว

    Gracias Me sirbio de mucha ayuda!

  • @anahernandezgarcia5823
    @anahernandezgarcia5823 10 ปีที่แล้ว

    muy buen tutorial gracias

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

    thank so much bro.

  • @lifeinanutshell28
    @lifeinanutshell28 10 ปีที่แล้ว

    Thank U...

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

    Sir I need urgent help please help me

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

    thx

  • @rickyhernandez9254
    @rickyhernandez9254 9 ปีที่แล้ว

    Please help me do this using c# webform., thanks

  • @poisoncriz
    @poisoncriz 10 ปีที่แล้ว

    Thank yOU

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

    Super

  • @gibransproger
    @gibransproger 11 ปีที่แล้ว

    Thanks!

  • @GiancarloCarccamo
    @GiancarloCarccamo 11 ปีที่แล้ว

    thank you nice video dude

  • @AliHasnat
    @AliHasnat 8 ปีที่แล้ว

    thanks

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

    its not working

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

    not working :/

  • @Akahunter713
    @Akahunter713 9 ปีที่แล้ว

    thx, dude. realy

  • @ozgurabd
    @ozgurabd 10 ปีที่แล้ว

    Could you please send me this project ? Thx :)

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

    this doesnt work

  • @8241caique
    @8241caique 9 ปีที่แล้ว

    thaaaaaaaaaaaaaaaaaanks!

  • @yippeeki-yey
    @yippeeki-yey 5 ปีที่แล้ว

    How to do this shit on MVP/ MVC?

  • @joshuasantos1044
    @joshuasantos1044 11 ปีที่แล้ว +1

    it works BUT you need to use the codes that he used in his past videos
    C# Tutorial 13:Show database values in Table or DataGridView
    C# Tutorial 20: Change column title of datagridview when connecting Mysql
    if you did not use his codes from the past videos then the exact codes presented here wont work.
    P.S: I'm using sql server btw so i don't exactly copy the codes word for word. I just replace the mysql codes to its corresponding sql server codes.. just saying

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

    Sale akhe video me time pass hi Kiya update , delete to kar datagridview me