Search results for query: *

  1. H

    programatically click column header of a Datagrid

    Thank you JohnH. Finally got it working along with the rest of my code. The last code I posted was for a Custom User Control, which I realise I don't need now you have given me an example to explain it. Thank you again for the help and also vis781 Holly Max
  2. H

    programatically click column header of a Datagrid

    OK this is the Custom Control I created. Using the line I get the following error Custom Control code PublicClass MyDataGrid Inherits DataGrid 'Inherits System.Windows.Forms.DataGrid #Region " Windows Form Designer generated code " PublicSubNew() MyBase.New() 'This call is required by...
  3. H

    programatically click column header of a Datagrid

    Also I didn't post the C# code laid out in case I missed part of the code in amongst the article. That's why I posted the whole thing as it was. I've never done any C# coding. I have read some and can sometimes follow what the vb.net equivalent is or should be.
  4. H

    programatically click column header of a Datagrid

    Thanks for the help so far. Now is this code used as a User Control, or how do I replace the standard datagrid with MyDataGrid (or make the reference to this new control)? I know you haven't tested it but can you see any problems using this type of method to acheive what I am trying to do...
  5. H

    programatically click column header of a Datagrid

    This is the whole article. Hope this helps you. "This code sorts a Windows.Forms.DataGrid programmatically, "emulating" a header click" Introduction This article shows, how to programmatically sort a System.Windows.Forms.DataGrid. In other words, how to emulate a "click" on a column header...
  6. H

    programatically click column header of a Datagrid

    I need to sort a datagrid control by programatically clicking the column header of a Datagrid. I have seen code in C# that uses the datagrid's private method ColumnHeaderClicked, but this is beyond me. My problem is that if I use the .DefaultView.Sort I loose the binding I need to text boxes...
Back
Top