C# Tutorial - Search DataGridView by using TextBox | FoxLearn

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

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

  • @ValentinGriaznov
    @ValentinGriaznov 7 ปีที่แล้ว +9

    search for two rows dv.RowFilter = string.Format("Name like '%{0}%' or LasName like '%{0}%'", textBox1.Text);

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

    Dear. Thank you so much for your great efforts

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

      You're welcome. Thank you !

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

    This worked for me

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

    Hi, I'm doing an experiment on a lottery table which contains a "date" (column1) the "wheel" (column 2) and the other 5 columns with numbers, which would be the draws. I can't search for 5 numbers chosen by me in no particular order. For example:
    The numbers to look for are:
    22 34 67 87 90, in the search if there is such an extraction, it finds it only in order or in sequence as I write it, while my goal would be that the 5 numbers can be found even if in different positions, for example 22 not as first extract but second or third, fourth and finally fifth, so for all the others, since the combinations are different and the numbers can come out on different columns. How to do?

  • @datoyjohnharveym.3813
    @datoyjohnharveym.3813 4 ปีที่แล้ว +3

    Thank you for the tutorial can i have the source code?

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

    Dear. Thank you so much for your great efforts. I want to apply this tutorial in Visual studio C++2010. How can I do it?.

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

    How can i do it. Can you make video plz.
    Focus on a datagridview and a textbox at the same time in a C# winform

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

    Great video it helped me a lot but I'm getting an error with only one specific column. The program throws an error message saying that the column "name" couldn't be found. Any ideas on how to fix that? ):

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

      Alright its not only one column its happening with all the columns that are named like this "Last name". So how can I call a column that has two words in its name?

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

    my search is not working
    this is the code i have written. same as you...
    i am feeding datagridview from excel sheet and its working but the search code is not working.
    private void txtSearch_KeyPress(object sender, KeyPressEventArgs e)
    {
    if (e.KeyChar == (char)13)
    {
    DataView dv = dt.DefaultView;
    dv.RowFilter = string.Format(" Date like'%{0}%'", txtSearch.Text);
    dataGridView1.DataSource = dv.ToTable();
    }
    }

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

      What error are you getting?

    • @tri-edge
      @tri-edge 5 ปีที่แล้ว

      When I type 1 in searchbox the data in datagridview disappear. Keypress looks like don't work i just need to press the enter button in keyboard but still having a blank datagrid

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

    I've got an error of "cannot find column [column_name]" even though I already copy my column name from database? any idea why?

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

      Please check your column name again, make sure your data source contain the column

  • @kirankumary.k4062
    @kirankumary.k4062 7 ปีที่แล้ว

    can you provide a master search for whole documents/ project like google search engine i work on project bt use search by id,name and some other options but i need master search if we enter any character its filter in datagrid

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

      Hi, You can integrate lucene search to your application, i'll make the tutorial soon

    • @kirankumary.k4062
      @kirankumary.k4062 7 ปีที่แล้ว

      okay thank you

  • @mirkogonzalez6784
    @mirkogonzalez6784 5 ปีที่แล้ว +1

    But without sql , only datagrid data , how i can do it?

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว +1

      You should add data to your datasource, then you can filter the same way

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

    Please may you write some tutorial in VB.NET?

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

    como puede hacer esa Busque da com mas de un Filtro o se otra colunna

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

    Load of property'RootNamespace 'failed. The string for the root namespace must be a valid identifier.
    Sir how can i solve this error

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

      Please check your code again

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

    THANKSSSSSSSSSSSSSSSSSS VERY THANKS YOUUU so sweet very sweet

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

    how can i use with dataset instead of datatable

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

    please include the int and datetime, it displays an error : 'Cannot perform 'Like' operation on System.Int32 and System.String.'

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

      Hey there! I have the same error, did you ever find a fix at all?

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

    can you tell me the name of background music ?

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

    I want to search textbox [] how to do this ?

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

      Not clear your intention. Can you describe more details? thank you !

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

      @@foxlearn Example: I have B001,B002,B003,C001,C002,C003,G001,G002,G003 in datagridview column, I want to search in textbox B001 C001 G001,and they combine together in datagridview, How to do this ?

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

    thx bro

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

    what if im using ms access ?

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

      Similar way

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

      @@foxlearn how can i apply it on your other tutorial crud ms access ?

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

    how to filter and display record with repeater using textbox

  • @Молодыемывзолотыедни
    @Молодыемывзолотыедни 4 ปีที่แล้ว

    Gooodd like!!!!

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

    Please do it without sql database

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว +1

      OK. Thank you for your suggestion !

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

    NOOB