Hi
i build a user control that include a GridView and more objects.
i need to display the grid to the user without selecting the first row.
in the DataBindingComplete Event i add this line to unselect row :
this.CurrentRow = null;
when the grid show in the first time it's ok, none of the rows selected.
but when i change the DataSource of the grid, the first row selected !
when i use the debuger i saw that after the DataBindingComplete event run the
SelectionChanged event run too.
when i use the debugger in the first time that the form show, I saw that DataBindingComplete event run and after that the SelectionChanged run and after that DataBindingComplete event run again.
And because of that the line that I add (this.CurrentRow = null;) run in the end and none of the row selected.
What can I do to unselect row ?
I whant that the code I write will be in the user control and not in the forms code.
ddService = radHView1.GridViewElement.GetService<Telerik.WinControls.RadDragDropService>(); ddService.PreviewDragOver += new System.EventHandler<Telerik.WinControls.RadDragOverEventArgs>(_ddService_PreviewDragOver); ddService.PreviewDragDrop += new System.EventHandler<Telerik.WinControls.RadDropEventArgs>(_ddService_PreviewDragDrop); ddService.PreviewDragHint += new System.EventHandler<Telerik.WinControls.PreviewDragHintEventArgs>(_ddService_PreviewDragHint); GridCellElement ) as shown in the example
http://www.telerik.com/community/forums/winforms/gridview/drag-amp-drop-functionalities-to-swap-column.aspx
For the data-bound Gridrows the events do not get fired.
Am I doing something wrong? Is there any kind of documentation for the new drag and drop mechanism?
Thanks
Markus
Dim c1 As New ConditionalFormattingObject("ReferenceWeek0", ConditionTypes.Equal, _supplyLogicLayer.Mapping(0), "", True)c1.RowBackColor = Color.FromArgb(79, 129, 189)c1.CellBackColor = Color.FromArgb(79, 129, 189)c1.CellForeColor = Color.Whitec1.RowForeColor = Color.WhiteDim c5 As New ConditionalFormattingObject("Adjusted", ConditionTypes.Equal, "Adjusted Net Requirement (User Input)", "", True)c5.RowBackColor = Color.Orangec5.CellBackColor = Color.Orangec5.CellForeColor = Color.BlackDim c6 As New ConditionalFormattingObject("SupplyAdjusted", ConditionTypes.Equal, "Supply Adj. Forecast (User Input)", "", True)c6.RowBackColor = Color.Yellowc6.CellBackColor = Color.Yellowc6.CellForeColor = Color.BlackDim c2 As New ConditionalFormattingObject("KPI1", ConditionTypes.Equal, "GREEN", "", False)c2.RowBackColor = Color.FromArgb(97, 189, 122)c2.CellBackColor = Color.FromArgb(97, 189, 122)c2.CellForeColor = Color.FromArgb(97, 189, 122)Dim c3 As New ConditionalFormattingObject("KPI2", ConditionTypes.Equal, "YELLOW", "", False)c3.RowBackColor = Color.FromArgb(254, 221, 107)c3.CellBackColor = Color.FromArgb(254, 221, 107)c3.CellForeColor = Color.FromArgb(254, 221, 107)Dim c4 As New ConditionalFormattingObject("KPI4", ConditionTypes.Equal, "RED", "", False)c4.RowBackColor = Color.FromArgb(246, 150, 136)c4.CellBackColor = Color.FromArgb(246, 150, 136)c4.CellForeColor = Color.FromArgb(246, 150, 136)grid.MasterGridViewTemplate.Columns("Measure").ConditionalFormattingObjectList.Add(c1)grid.MasterGridViewTemplate.ChildGridViewTemplates(0).Columns("Measure").ConditionalFormattingObjectList.Add(c1)grid.MasterGridViewTemplate.Columns("Measure").ConditionalFormattingObjectList.Add(c5)grid.MasterGridViewTemplate.Columns("Measure").ConditionalFormattingObjectList.Add(c6)For Each dc As GridViewDataColumn In grid.MasterGridViewTemplate.Columns Select Case dc.FieldName Case "ZZMIN" dc.Width = 70 dc.TextAlignment = ContentAlignment.MiddleCenter dc.ReadOnly = True Case "SourcePlant" dc.TextAlignment = ContentAlignment.MiddleCenter dc.Width = 70 dc.ReadOnly = True Case "Plant" dc.Width = 70 dc.ReadOnly = True Case "Measure" dc.Width = 210 dc.ReadOnly = True Case "Material" dc.TextAlignment = ContentAlignment.MiddleCenter dc.Width = 70 dc.ReadOnly = True Case Else If IsDate(dc.FieldName) Then 'Format values dc.FormatString = "{0:####,##0}" dc.Width = 70 dc.TextAlignment = ContentAlignment.MiddleRight dc.ReadOnly = False 'add conditional formatting for KPIs to each week column dc.ConditionalFormattingObjectList.Add(c2) dc.ConditionalFormattingObjectList.Add(c3) dc.ConditionalFormattingObjectList.Add(c4) End If End SelectNext'Format childgridFor Each dc As GridViewDataColumn In grid.MasterGridViewTemplate.ChildGridViewTemplates(0).Columns Select Case dc.FieldName Case "ZZMIN" dc.TextAlignment = ContentAlignment.MiddleCenter dc.ReadOnly = True Case "SourcePlant" dc.TextAlignment = ContentAlignment.MiddleCenter dc.ReadOnly = True Case "Plant" dc.TextAlignment = ContentAlignment.MiddleCenter dc.ReadOnly = True Case "Measure" dc.ReadOnly = True Case "Material" dc.TextAlignment = ContentAlignment.MiddleCenter dc.ReadOnly = True Case Else If IsDate(dc.FieldName) Then dc.FormatString = "{0:####,##0}" dc.TextAlignment = ContentAlignment.MiddleRight dc.ReadOnly = False 'add conditional formatting for KPIs to each week column dc.ConditionalFormattingObjectList.Add(c2) dc.ConditionalFormattingObjectList.Add(c3) dc.ConditionalFormattingObjectList.Add(c4) End If End SelectNextgrid.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Nonegrid.MultiSelect = Trueprivate void tTickets_Tick(object sender, EventArgs e){ int selectedrow = gridview.CurrentCell.RowIndex; GetData(); gridview.CurrentRow = gvMassTickets.Rows[selectedrow];}Hello,
I use the RadCalendar with the Office2010 style. When I activate the row header the calendar week is shown. But when I start my application only the first numer is visible. The width of the row header is to small. So, how can I change the width of the row header.
Best regards
Martin
Hi,
in the RadForms demo application the cells of the calendar control (First Look) have a blue header an are separated with a thin blue lines. In the example code the calendar controls uses a "Scheduler" theme. Is this theme only used inside the demo? I try to get the same visual style in my application, but without success.
Regards
Martin