Last post Dec 30, 2016 07:53 AM by Cathy Zou
Dec 24, 2016 07:41 PM|aprangulashvili|LINK
i had added in windows form gridview and in gridview textbox and combobox. then i set datasource in combobox from entity framework and it's working well. i have problem when i trying to add record. anyone know how to get values from this components.
test t = new test();
t.column-x = gridvview_column (and how to get converted values from this textbox and combobox)
error - Error 1 Cannot implicitly convert type 'System.Windows.Forms.DataGridViewTextBoxColumn' to 'int'
Dec 25, 2016 09:54 PM|sardessardes|LINK
this is my gridview code and its working well. there is a label and image button, when i clicked image button than i get values to textbox1.
protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
GridViewRow gvr = ((ImageButton)sender).Parent.Parent as GridViewRow;
Label lblid = (Label)gvr.FindControl("Label2");
TextBox1.Text = lblid.Text;
Dec 26, 2016 08:03 AM|Cathy Zou|LINK
From your error message. You couldn’t convert DataGridViewTextBoxColumn type to integer.
It seems that t. column-x is integer type and gridvview_column is DataGridViewTextBoxColumn.
For less of code you have done. I am not sure the problem.
Would you please provide more code about this problem?
Dec 27, 2016 07:59 AM|aprangulashvili|LINK
so i want to create Gridview which has drop downs and every new record will come from this drop downs. i'm using entity framework and simple domain structure. everything is working on db site. i getting data in drop downs but a can't insert because can't
convert data from drop downs. code which i'm using is on button on click event.
Dec 30, 2016 07:53 AM|Cathy Zou|LINK
From your description, I couldn’t restore your problem exactly. So, would you please provide the code you have done？
So that we could restore your problem and find the reason for your problem.