日期:2014-05-18  浏览次数:20488 次

GridDateTimeColumn属性修改不了
前面 动态加的列 GridDateTimeColumn GDDateTime = new GridDateTimeColumn();
  this.RadGrid1.MasterTableView.Columns.Add(GDDateTime);
  GDDateTime.FilterImageToolTip = "查询";
  GDDateTime.DataFormatString = "{0:yyyy-MM-dd}";
  GDDateTime.DataField = de.Key.ToString();
  GDDateTime.HeaderText = de.Value.ToString();

后面想把GridDateTimeColumn 里的RadDatePicker的属性改掉:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
  {
  if(e.Item.ItemType==GridItemType.FilteringItem){ 
  TableCell cell = e.Item.Cells[8];
  (cell.Controls[0] as RadDatePicker).Calendar.FastNavigationSettings.DateIsOutOfRangeMessage = "时间超出范围";
  (cell.Controls[0] as RadDatePicker).Calendar.FastNavigationSettings.OkButtonCaption = "确定";
  (cell.Controls[0] as RadDatePicker).Calendar.FastNavigationSettings.TodayButtonCaption = "今天";
  (cell.Controls[0] as RadDatePicker).Calendar.FastNavigationSettings.CancelButtonCaption = "取消";
  }
  }

------解决方案--------------------
这个你要在添加的列的地方那里改