This is a migrated thread and some comments may be shown as answers.

Filtering Question

10 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris Kirkman
Top achievements
Rank 1
Chris Kirkman asked on 30 Nov 2010, 08:29 PM
My filter image and sort image seem to overlap in the column headers of my grid.  I'm using the Office2010 theme.

Also, when the user has selected a filter, there is no visual indication that the data in the grid is filtered.  Is there a way to update the filter icon so that it "appears" filtered?

10 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 30 Nov 2010, 10:42 PM

Hello Chris,

From what I see in Office2010 theme, there isn't any overlap. The sort order image shows on the header itself, whilst the sort image shows on the header row. The indicator in that the column is filtered is the value in the filter cell. If this isn't what you mean, would you mind providing a screenshot that indicates the issue?

I hope this helps.
Richard
0
Chris Kirkman
Top achievements
Rank 1
answered on 30 Nov 2010, 10:56 PM
Sure, see below

0
Richard Slade
Top achievements
Rank 2
answered on 30 Nov 2010, 11:18 PM
Hi Chris,

Thanks. What version of the controls are you using? If it is the latest one, would you be able to provide me with a really basic sample? I can't promise I can sort this for you, but I'm happy to take a look.

regards
richard
0
Chris Kirkman
Top achievements
Rank 1
answered on 01 Dec 2010, 03:19 PM
Yes, used the latest build.  I'll put together a quick application and add it in a few minutes.

Ok, added a .zip file.  You'll need to rename it to open it.
0
Richard Slade
Top achievements
Rank 2
answered on 01 Dec 2010, 03:39 PM
Hi Chris,

Zip files that are renamed to img files won't show up here. The only way to do it on the firus is to paste in text and use the Format Code block.
Regards,
Richard
0
Chris Kirkman
Top achievements
Rank 1
answered on 01 Dec 2010, 03:59 PM
Yea, I noticed that.  ;)  I added this as a support ticket item.
0
Richard Slade
Top achievements
Rank 2
answered on 01 Dec 2010, 04:01 PM
Hi,

Ok. A support ticket will go directly to Telerik.
If you need any advice in the forums though, just let me know.

Thanks
Richard
0
Chris Kirkman
Top achievements
Rank 1
answered on 01 Dec 2010, 04:06 PM
Here's the code...

-- Class containing object we'll bind to the grid

using

 

 

System;

 

using

 

 

System.Collections.Generic;

 

using

 

 

System.Linq;

 

using

 

 

System.Text;

 

namespace

 

 

RadGridTest

 

{

 

 

class Person

 

{

 

 

public Person(string strFirst, string strLast)

 

{

First = strFirst;

Last = strLast;

}

 

 

public string First { get; set; }

 

 

 

public string Last { get; set; }

 

}

 

 

class PersonCollection : List<Person> { }

 

}


-- Rad Form with the bound grid

using

 

 

System;

 

using

 

 

System.Collections.Generic;

 

using

 

 

System.ComponentModel;

 

using

 

 

System.Data;

 

using

 

 

System.Drawing;

 

using

 

 

System.Linq;

 

using

 

 

System.Text;

 

using

 

 

System.Windows.Forms;

 

using

 

 

Telerik.WinControls.UI;

 

namespace

 

 

RadGridTest

 

{

 

 

public partial class Form1 : RadForm

 

{

 

 

public Form1()

 

{

InitializeComponent();

 

 

PersonCollection people = new PersonCollection();

 

people.Add(

 

new Person("John", "Smith"));

 

people.Add(

 

new Person("Frank", "Thompson"));

 

people.Add(

 

new Person("Bob", "Tillman"));

 

people.Add(

 

new Person("Chris", "Franklin"));

 

m_grd.DataSource = people;

}

}

}


-- Designer file for the form

namespace

 

 

RadGridTest

 

{

 

 

partial class Form1

 

{

 

 

/// <summary>

 

 

 

/// Required designer variable.

 

 

 

/// </summary>

 

 

 

private System.ComponentModel.IContainer components = null;

 

 

 

/// <summary>

 

 

 

/// Clean up any resources being used.

 

 

 

/// </summary>

 

 

 

/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

 

 

 

protected override void Dispose(bool disposing)

 

{

 

 

if (disposing && (components != null))

 

{

components.Dispose();

}

 

 

base.Dispose(disposing);

 

}

#region

 

 

Windows Form Designer generated code

 

 

 

/// <summary>

 

 

 

/// Required method for Designer support - do not modify

 

 

 

/// the contents of this method with the code editor.

 

 

 

/// </summary>

 

 

 

private void InitializeComponent()

 

{

 

 

this.office2010Theme1 = new Telerik.WinControls.Themes.Office2010Theme();

 

 

 

this.m_grd = new Telerik.WinControls.UI.RadGridView();

 

((System.ComponentModel.

 

ISupportInitialize)(this.m_grd)).BeginInit();

 

((System.ComponentModel.

 

ISupportInitialize)(this)).BeginInit();

 

 

 

this.SuspendLayout();

 

 

 

//

 

 

 

// m_grd

 

 

 

//

 

 

 

this.m_grd.Dock = System.Windows.Forms.DockStyle.Fill;

 

 

 

this.m_grd.Location = new System.Drawing.Point(0, 0);

 

 

 

//

 

 

 

// m_grd

 

 

 

//

 

 

 

this.m_grd.MasterTemplate.EnableFiltering = true;

 

 

 

this.m_grd.MasterTemplate.ShowFilteringRow = false;

 

 

 

this.m_grd.MasterTemplate.ShowRowHeaderColumn = false;

 

 

 

this.m_grd.Name = "m_grd";

 

 

 

this.m_grd.ShowGroupPanel = false;

 

 

 

this.m_grd.ShowHeaderCellButtons = true;

 

 

 

this.m_grd.Size = new System.Drawing.Size(335, 225);

 

 

 

this.m_grd.TabIndex = 0;

 

 

 

this.m_grd.ThemeName = "Office2010";

 

 

 

//

 

 

 

// Form1

 

 

 

//

 

 

 

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

 

 

 

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

 

 

 

this.ClientSize = new System.Drawing.Size(335, 225);

 

 

 

this.Controls.Add(this.m_grd);

 

 

 

this.Name = "Form1";

 

 

 

//

 

 

 

//

 

 

 

//

 

 

 

this.RootElement.ApplyShapeToControl = true;

 

 

 

this.Text = "Rad Grid Test";

 

 

 

this.ThemeName = "Office2010";

 

((System.ComponentModel.

 

ISupportInitialize)(this.m_grd)).EndInit();

 

((System.ComponentModel.

 

ISupportInitialize)(this)).EndInit();

 

 

 

this.ResumeLayout(false);

 

}

#endregion

 

 

private Telerik.WinControls.Themes.Office2010Theme office2010Theme1;

 

 

 

private Telerik.WinControls.UI.RadGridView m_grd;

 

}

}

 


0
Richard Slade
Top achievements
Rank 2
answered on 01 Dec 2010, 04:18 PM
Hi Chris,

Would you mind re-posting this please using the Format Code block as it takes considerable effort to format a code file from the text pasted here.
Many thanks
Richard
0
Svett
Telerik team
answered on 03 Dec 2010, 10:01 AM
Hello Chris,

Please follow the answer that we provided in your support ticket 372163. If you need further assistance, feel free to write back.

All the best,
Svett
the Telerik team

Get started with RadControls for WinForms with numerous videos and detailed documentation.
Tags
GridView
Asked by
Chris Kirkman
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Chris Kirkman
Top achievements
Rank 1
Svett
Telerik team
Share this question
or