Completed
Last Updated: 11 Nov 2015 10:00 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 31 Jan 2014 08:36
Category: GridView
Type: Bug Report
1
FIX. RadGridView - row resizing is not allowed when "AllowRowReorder" and "AllowRowResize" properties are set to true
Workaround:

public Form1()
{
    InitializeComponent();
    radGridView1.CreateCell += radGridView1_CreateCell;
}
 
private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.CellType == typeof(GridDataCellElement))
    {
        e.CellElement = new CustomDataCell(e.Column,e.Row);
    }
}
 
public class CustomDataCell : GridDataCellElement
{
    public CustomDataCell(GridViewColumn column, GridRowElement row) : base(column, row)
    {
    }
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridDataCellElement);
        }
    }
 
    protected override void OnMouseDown(MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Left &&
            this.AllowRowReorder &&
            this.ViewTemplate.AllowRowReorder &&
            Cursor.Current != Cursors.SizeNS)
        {
            base.OnMouseDown(e);
        }
    }
}
0 comments