Cannot perform 'Like' operation on System.Int32 and System.String. DataGridView search and filter

后端 未结 3 1254
旧时难觅i
旧时难觅i 2020-12-16 03:49

I have a form that when I select a column name from a ComboBox, and type in a text box it filters and displays the searched criteria in the DataGridView. When I search for \

3条回答
  •  生来不讨喜
    2020-12-16 04:13

    the code tried to search from gridview (devexpress)..

       DataRow[] dr = dt.Select("invoiceId ='" + Convert.ToInt32(gridView1.GetRowCellValue(id, "invoiceId")) + "' AND  '%" + Convert.ToDouble(gridView1.GetRowCellValue(id, "Amount_Paid")) + "%' LIKE   '%" + Convert.ToDouble(gridView1.GetRowCellValue(id, "Amount")) + "%' ");
    
                        if (dr.Length > 0)
                        {
                            MessageBox.Show("already paid");
                        }
    

提交回复
热议问题