none
how to take value from datatable with linq concept RRS feed

  • Question



  • hi to all,


           im fresher for vb.net 2008......... i have to create data filter ........... i have to use  LINQ concept........i am  trying to

    collect value from  data table value  to linq that creating some errors......... please any one help me ............i m attached
     some sample coding




     If Grid.Rows(I).Cells(1).Value = "=" Then

    If Grid.Rows(I).Cells(3).Value.ToString.StartsWith("System.String") Then

    ' fil is datarow and dtTemp is datatable

    Dim linqCurrent = From fil In dtTemp.AsEnumerable() Where_  
     _ fil.Field(OfString)(Grid.Rows(I).Cells(0).Value.ToString) = Grid.Rows(I).Cells(2).Value Select fil

              dtTemp.Rows.Clear()

              dtTemp.Rows.Add(linqCurrent)

              end if
    end if


                              
       thanking you

      dustagir                        

    Tuesday, June 17, 2008 9:04 AM

All replies

  • What exactly do you need to achieve and why do you need to use LINQ to assign single value?

     

    Friday, June 20, 2008 10:30 AM
    Moderator


  • thanks for reply....

    i m just gave  sample one record...... actually i have 25,000 records, and 66 rows.......... person can select any row with any

    condition(=,>,<,<>,startwith,endwith,like & etc). so giv me better solution for that one


    thanks


    dustagir
    Friday, June 20, 2008 2:24 PM