public
Window1()
{
myAccess =
new DOAccess();
mySet =
new DataSet();
InitializeComponent();
mySet = myAccess.GetForecastData(mySet, 200802, 0, 0, 0);
mySet.Relations.Add(
"Item", mySet.Tables[0].Columns["forecast_rollup_id"],
mySet.Tables[1].Columns[
"forecast_rollup_id"]);
mySet.Relations.Add(
"Detail", mySet.Tables[1].Columns["forecast_item_id"],
mySet.Tables[2].Columns[
"forecast_item_id"]);
this
.radGridViewCustomHierarchy.DataMember = mySet.Tables[0].TableName;
this.radGridViewCustomHierarchy.ItemsSource = mySet;
}
The thing is that some columns coming from the DataSet were labeled such as "forecast_rollup_id" and I want to change the name of the actual column in the actual grid to something like "Main Item Number" (something more user-friendly). Since I am using a DataSet and I am loading information to the RadDataGrid dynamically, I am not sure how I can change the column name because when I try to get access to the columns property, I get a count value = 0 (So int columns = this.radGridViewCustomHierarchy.Columns.Count; returns zero) therefore I cannot simply do something like this: this.radGridViewCustomHierarchy.Columns["forecast_rollup_id"].HeaderText = "Main Item #"; because I get a xaml error. Furthermore, I may need to rename some columns that contain dynamic values (Thus, I cannot use alies for columns in SQL). A column may be called 200801 which needs to be renamed "Q1 2008" (Quarter One of 2008) in the grid itself. Could you please let me know how I can accomplish this change in naming to columns that were originally populated from a DataSet?