How to Insert User Control into DataGrid Cell ?
-
Hi How to insert string value and Button in Datagridview cell. Like properties window in visual studio 2005. In our project, their is a module which shows same like Properties windows in visualstudio 2005. so that we use datagridview and using DataGridViewComboBoxCell to insert combo box in some particular cell. our problem is suppose if we insert a filename, so that we need textbox and same with small button which will used to browse the file. so that how to insert usercontrol or textbox with button in datagridview cell?
-
Hi How to insert string value and Button in Datagridview cell. Like properties window in visual studio 2005. In our project, their is a module which shows same like Properties windows in visualstudio 2005. so that we use datagridview and using DataGridViewComboBoxCell to insert combo box in some particular cell. our problem is suppose if we insert a filename, so that we need textbox and same with small button which will used to browse the file. so that how to insert usercontrol or textbox with button in datagridview cell?
i didn't work a lot With DataGridView, adding userControl to DataGridView can be done but in the cell I don't know you can inherit from DataGridViewTextBoxCell class and override the Paint method for resizing the TextBox (i said form TextBoxCell because creating a TextBox is far more harder than a Button) and for drawing a button beside the textBox. I know this is a tedious solution but it would work!
-
i didn't work a lot With DataGridView, adding userControl to DataGridView can be done but in the cell I don't know you can inherit from DataGridViewTextBoxCell class and override the Paint method for resizing the TextBox (i said form TextBoxCell because creating a TextBox is far more harder than a Button) and for drawing a button beside the textBox. I know this is a tedious solution but it would work!
Thanks Hessam Jalali, yet to try this, can you explain little bit briefly.