or
RadDateTimeEditor editor = this.radGridView1.ActiveEditor as RadDateTimeEditor; if (editor != null) { RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)editor.EditorElement; editorElement.ShowUpDown = true; }Me
.RadChart.PlotArea.XAxis.DataLabelsColumn as far as I know.
However, I want to replace the X Axis labels with meaningful names I.e Jan Feb Mar etc...
I have tried adding this in during the loop and the labels show, but once the labels show, the data doesn't.
Please can you advise an easy way to get the X Axis labels to be set to a custom value
Thanks
Richard
Hello!
Was the meaning of GridCellElement.RowIndex property changed since 2009-Q3?
Please see the following code snippet:
01.public Form1() 02.{ 03. InitializeComponent(); 04. 05. radGridView1.Columns.Add(new GridViewTextBoxColumn("Group")); 06. radGridView1.Columns.Add(new GridViewTextBoxColumn("RowIndex")); 07. 08. for (int i = 0; i < 3; i++) 09. radGridView1.Rows.Add("Group 1"); 10. for (int i = 0; i < 3; i++) 11. radGridView1.Rows.Add("Group 2"); 12. 13. radGridView1.MasterTemplate.GroupDescriptors.Add(new GroupDescriptor("Group")); 14.} 15. 16.private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) 17.{ 18. if (e.CellElement.ColumnInfo.Name == "RowIndex") 19. e.CellElement.Value = e.CellElement.RowIndex.ToString(); 20.} I expect the following result:
Group 1
0
1
2
Group 2
3
4
5
But the result is:
Group 1
0
1
2
Group 2
0
1
2
It seems that the RowIndex is an index inside the group but not the entire grid. Could you please confirm this?
Is the following workaround correct?
1.int rowIndex = radGridView1.Rows.IndexOf(e.CellElement.RowInfo);Thank you.
public class CustomGridHierarchyRowBehavior : GridHierarchyRowBehavior{ protected override bool ProcessTabKey(KeyEventArgs keys) { if (GridViewElement.Navigator.IsLastColumn(GridViewElement.CurrentColumn) && !keys.Shift) { GridViewElement.Navigator.Select(GridViewElement.CurrentRow.ChildRows[0], GridViewElement.CurrentRow.ChildRows[0].ViewTemplate.Columns[0]); return true; } return base.ProcessTabKey(keys); }}