Click here to Skip to main content
15,896,453 members

Comments by Amar chand123 (Top 92 by date)

Amar chand123 10-May-21 10:08am View    
I want my custom user control bind with datagridview textbox column and if i type text or click datagridview textbox column my user control show like combobox dropdown box
Amar chand123 13-Feb-21 7:56am View    
New Error show'String or binary data would be truncated.
The statement has been terminated.'
when i use this
private void SaveUpdateMess()
{
foreach (DataGridViewRow row in dataGridView1.Rows)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DataConnectionString"].ConnectionString);
string SaveUpdateBM = "if exists (Select * from BD where OrderNo = @OrderNo and BodyM = @BodyM) Begin update BD set Mess = @Mess where OrderNo = @OrderNo and BodyM = @BodyM End else Begin insert into BD (OrderNo, BodyM, Mess) VALUES (@OrderNo, @BodyM, @Mess) End";
using(SqlCommand cmd = new SqlCommand(SaveUpdateBM, con))
{
con.Open();

cmd.Parameters.AddWithValue("@OrderNo", txtOrder_No.Text);
cmd.Parameters.AddWithValue("@BodyM", row.Cells["BodyM"].ToString());
cmd.Parameters.AddWithValue("@Mess", row.Cells["Mess"].ToString());

cmd.ExecuteNonQuery();
con.Close();
}
}

}
Amar chand123 8-Dec-20 7:40am View    
My problem is not datagridview filters my problem is who i use datagridview combobox autocomplete List show data. like if my custom datasource have Apple, Banana and i press
"A" in datagridview combobox cell than autocomplete suggestion show Apple and Banana, only only Apple
Amar chand123 8-Dec-20 7:40am View    
My problem is not datagridview filters my problem is who i use datagridview combobox autocomplete List show data. like if my custom datasource have Apple, Banana and i press
"A" in datagridview combobox cell than autocomplete suggestion show Apple and Banana, only only Apple
Amar chand123 23-Oct-20 6:58am View    
Then how my workplace application create in database in his executable path my workplace application install in Direct C:\ not in C:\Program Files