FilterDescriptors.Expression allways empty

2 posts, 0 answers
  1. Vicent
    Vicent avatar
    1 posts
    Member since:
    Mar 2015

    Posted 13 May Link to this post

    I have this piece of code very similar to the one in the demos but I allways get an empty string from FilterDescriptors.Expression


    this.Confecciones.AllowFiltering = true;

    this.ConfeccionesGV.FilterChanged += Confecciones_FilterChanged;



    void ConfeccionesGV_FilterChanged(object sender, VirtualGridEventArgs e)

            private void Filter()
                string filterExpression = this.ConfeccionesGV.FilterDescriptors.Expression;
                if (!string.IsNullOrEmpty(filterExpression))

  2. Dimitar
    Dimitar avatar
    1337 posts

    Posted 17 May Link to this post

    Hello Vicent,

    Thank you for writing.

    You need to specify the FieldName in the CellValueNeeded event handler. This way the expression will be set properly:
    if (e.RowIndex < 0)
        e.FieldName = "Col" + e.ColumnIndex;

    Please let me know if there is something else I can help you with. 
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
Back to Top