ultraman Posted September 10, 2003 Posted September 10, 2003 I just search the forum for DataGrid answers, but unfortunately, I found a lot of questions, with few answers. I would just like to know if it's possible to change the selection style of a DatGrid. So that when a user click on a column, the entire row gets selected (like if he had click on the row marker on the left). Of course, my grid doesn't allow new and is not updatable. It would be the master part of a master-detail Form. Thanks ! Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
*Experts* Volte Posted September 10, 2003 *Experts* Posted September 10, 2003 I don't think so. The Select method allows you to select the control, or a row, but not a column, and the DataGridColumnStyle class doesn't seem to have any selection functionality. Quote
ultraman Posted September 11, 2003 Author Posted September 11, 2003 Well, I just reread my post and I think it wasn't very clear what I'm trying to do. It's not when a user click on a column, but on a particular cell. What I finally did is use the Select method of the DataGrid. So in the MouseUp event, I call this sub and it works fine. Private Sub mDataGrid_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles mDataGrid.MouseUp mDataGrid.Select(mDataGrid.CurrentRowIndex) End Sub Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
*Experts* Volte Posted September 11, 2003 *Experts* Posted September 11, 2003 Oops, sorry. :o I misread, and thought you wanted to be able to click on a column header and select the entire column. Glad you worked it out though. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.