How to add control in datagridview column..
-
hi friends.. I want to rtrive some imformation from database(say comments,which is somewhere around four to five lines)and bind the same to datagridview column..for that i need add a textbox which has a scroll property to datagrid column..can you plz tell me how to do this.. regards, Rahul
-
hi friends.. I want to rtrive some imformation from database(say comments,which is somewhere around four to five lines)and bind the same to datagridview column..for that i need add a textbox which has a scroll property to datagrid column..can you plz tell me how to do this.. regards, Rahul
Hi, Use the following steps to get the scroll bars and multiline drawn: 1) Implement the "EditingControlShowing" event handler of the datagrid. 2) Check if the currently editable control is of type "TextBoxEditingControl" . 3) Finally set the properties. The block of the code need to add in the "EditingControlShowing" event handler is as below: if (e.Control.GetType() == typeof(DataGridViewTextBoxEditingControl)) { DataGridViewTextBoxEditingControl EditingControl = (DataGridViewTextBoxEditingControl)e.Control; EditingControl .ScrollBars = ScrollBars.Both; EditingControl .Multiline = true; }
Manoj Never Gives up
-
Hi, Use the following steps to get the scroll bars and multiline drawn: 1) Implement the "EditingControlShowing" event handler of the datagrid. 2) Check if the currently editable control is of type "TextBoxEditingControl" . 3) Finally set the properties. The block of the code need to add in the "EditingControlShowing" event handler is as below: if (e.Control.GetType() == typeof(DataGridViewTextBoxEditingControl)) { DataGridViewTextBoxEditingControl EditingControl = (DataGridViewTextBoxEditingControl)e.Control; EditingControl .ScrollBars = ScrollBars.Both; EditingControl .Multiline = true; }
Manoj Never Gives up