none
Wpf Datagrid RowHeader

    Question

  • I am working on Datagrid RowHeader mouse over thing.

    How would I get DataGridRowHeader from rowIndex.

    Thanks Dee

    Tuesday, May 01, 2012 6:38 PM

All replies

  • Hi Dee Choksi

     Try this MSDN Documentation ...

    http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.rowheaderstyle%28VS.100%29.aspx

    Hope this helps you..


    Harshad..... Always 4 U

    Wednesday, May 02, 2012 4:47 AM
  • How would I get DataGridRowHeader from rowIndex.

    Not hundred percent sure what this means. What you have so far? Can you tell more about what you are doing and where you stuck in?

    Wednesday, May 02, 2012 8:34 AM
  • I have this code to generate column header mouse over event handler.

     private void RhinoDataGrid_Loaded(object sender, RoutedEventArgs e)
            {
                DataGrid grid = (DataGrid)sender;
                int columnCount = grid.Columns.Count;
                int rowCount = grid.Items.Count;

                // code for column header mouse over, Selecting all cells of selected column header
                for (int i = 0; i < grid.Columns.Count; i++)
                {
                    DataGridColumnHeader columnHeader = DataGridHelper.GetColumnHeader(this, i);
                    if (columnHeader != null)
                    {
                        columnHeader.MouseEnter += new MouseEventHandler(ColumnHeader_MouseEnter);
                        columnHeader.MouseLeave += new MouseEventHandler(ColumnHeader_MouseLeave);
                    }
                }

    }

    Same way i would like to create Mouse Enter event handler for Row Header from coding.

    Thanks

    Dee

    Wednesday, May 02, 2012 12:18 PM