This question is locked. New answers and comments are not allowed.
Hello,
I am experiencing a not expected behavior on the RowLoaded event, when all column's width is set to a fixed value, the e.Row.Cells collection only holds the first cell, the other cells are missing.
I need to assign a tooltip to every column header, and I found it to be simple in code behind, because if I define a template for the header and assign it in the XAML, when exporting the grid, there is a lot of work to do to export the right values in the cell headers.
Then, I have the following.
Then, e.Row.Cells.Count will be 4 only if at least one of the columns has its Width value to * (star), if I set all the columns's Width value to a fixed value e.Row.Cells.Count will be always 1.
Having a column's width to * (star) might be no problem, but I need an horizontal scrollbar because I currently have 15 columns to show and not all fit on the screen, so, setting on column's width to star prevents the scrollbar from showing and the MinWidth of every respect column is violated.
Any workaround?
Juan Mejia
I am experiencing a not expected behavior on the RowLoaded event, when all column's width is set to a fixed value, the e.Row.Cells collection only holds the first cell, the other cells are missing.
I need to assign a tooltip to every column header, and I found it to be simple in code behind, because if I define a template for the header and assign it in the XAML, when exporting the grid, there is a lot of work to do to export the right values in the cell headers.
Then, I have the following.
private void RadGridView_RowLoaded(object sender, RowLoadedEventArgs e)
{
if (e.Row is GridViewHeaderRow)
{
GridViewHeaderRow headerRow = e.Row as GridViewHeaderRow;
GridViewHeaderCell cell = (GridViewHeaderCell)headerRow.Cells[0];
cell.SetValue(ToolTipService.ToolTipProperty, "Column 1");
cell = (GridViewHeaderCell)headerRow.Cells[1];
cell.SetValue(ToolTipService.ToolTipProperty, "Column 2");
cell = (GridViewHeaderCell)headerRow.Cells[2];
cell.SetValue(ToolTipService.ToolTipProperty, "Column 3");
cell = (GridViewHeaderCell)headerRow.Cells[3];
cell.SetValue(ToolTipService.ToolTipProperty, "Column 4");
}
}
Then, e.Row.Cells.Count will be 4 only if at least one of the columns has its Width value to * (star), if I set all the columns's Width value to a fixed value e.Row.Cells.Count will be always 1.
Having a column's width to * (star) might be no problem, but I need an horizontal scrollbar because I currently have 15 columns to show and not all fit on the screen, so, setting on column's width to star prevents the scrollbar from showing and the MinWidth of every respect column is violated.
Any workaround?
Juan Mejia
