Kevin White
Top achievements
Rank 2
Kevin White
asked on 09 Jun 2011, 01:51 PM
Under the newest Telerik controls for Winforms (2011.1.11.419) -- Ungrouping seems to have changed. Instead of being able to drag from the group panel to ungroup - you must hit the "X". My users have a problem with this and would prefer the Drag and Drop Ungrouping feature.
Was this removed? And if so, is there a workaround I might employ?
Thanks
Was this removed? And if so, is there a workaround I might employ?
Thanks
3 Answers, 1 is accepted
0
Accepted
Hi Kevin White,
Yes, I confirm the issue. We will correct the behavior in our next version - Q2 2011. You can work around it by using custom rows. Please consider the following code:
You should handle the CreateRow event to replace the rows:
I updated your Telerik points for reporting this issue. Should you have any further questions, do not hesitate to contact me.
Kind regards,
Jack
the Telerik team
Yes, I confirm the issue. We will correct the behavior in our next version - Q2 2011. You can work around it by using custom rows. Please consider the following code:
public
class
MyGroupRow : GridGroupHeaderRowElement
{
protected
override
Type ThemeEffectiveType
{
get
{
return
typeof
(GridGroupHeaderRowElement);
}
}
protected
override
bool
ProcessDragOver(Point currentMouseLocation, ISupportDrag dragObject)
{
GroupFieldDragDropContext dataContext = dragObject.GetDataContext()
as
GroupFieldDragDropContext;
if
(dataContext !=
null
)
{
return
true
;
}
return
base
.ProcessDragOver(currentMouseLocation, dragObject);
}
protected
override
void
ProcessDragDrop(Point dropLocation, ISupportDrag dragObject)
{
GroupFieldDragDropContext dataContext = dragObject.GetDataContext()
as
GroupFieldDragDropContext;
if
(dataContext !=
null
)
{
dataContext.ViewTemplate.GroupDescriptors.Remove(dataContext.GroupDescription);
return
;
}
base
.ProcessDragDrop(dropLocation, dragObject);
}
}
public
class
MyDataRow : GridDataRowElement
{
protected
override
Type ThemeEffectiveType
{
get
{
return
typeof
(GridDataRowElement);
}
}
protected
override
bool
ProcessDragOver(Point currentMouseLocation, ISupportDrag dragObject)
{
GroupFieldDragDropContext dataContext = dragObject.GetDataContext()
as
GroupFieldDragDropContext;
if
(dataContext !=
null
)
{
return
true
;
}
return
base
.ProcessDragOver(currentMouseLocation, dragObject);
}
protected
override
void
ProcessDragDrop(Point dropLocation, ISupportDrag dragObject)
{
GroupFieldDragDropContext dataContext = dragObject.GetDataContext()
as
GroupFieldDragDropContext;
if
(dataContext !=
null
)
{
dataContext.ViewTemplate.GroupDescriptors.Remove(dataContext.GroupDescription);
return
;
}
base
.ProcessDragDrop(dropLocation, dragObject);
}
}
You should handle the CreateRow event to replace the rows:
void
radGridView1_CreateRow(
object
sender, GridViewCreateRowEventArgs e)
{
if
(e.RowInfo
is
GridViewDataRowInfo)
{
e.RowType =
typeof
(MyDataRow);
}
if
(e.RowInfo
is
GridViewGroupRowInfo)
{
e.RowType =
typeof
(MyGroupRow);
}
}
I updated your Telerik points for reporting this issue. Should you have any further questions, do not hesitate to contact me.
Kind regards,
Jack
the Telerik team
0
Kevin White
Top achievements
Rank 2
answered on 20 Jun 2011, 03:09 PM
Thank you, this works well.
Any estimate on a release date for this fix?
Any estimate on a release date for this fix?
0
Hi Kevin,
Our next release is scheduled for July, however, I am not able to provide you with exact date. If you have other questions, do not hesitate to ask.
Greetings,
Jack
the Telerik team
Our next release is scheduled for July, however, I am not able to provide you with exact date. If you have other questions, do not hesitate to ask.
Greetings,
Jack
the Telerik team