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

Clear Conditional format list

1 Answer 37 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joe Bohen
Top achievements
Rank 1
Joe Bohen asked on 04 Jun 2009, 10:21 AM

Hi

How do I clear previously created conditional formatting items from the ConditionalFormattingObject

Which were created using:

Dim con1 As ConditionalFormattingObject = New ConditionalFormattingObject("white rule", ConditionTypes.Contains, Me.RadTextBox1.Text.ToLower, Me.RadTextBox1.Text.ToLower, True)

            c1.RowBackColor = Color.Green

            RadGridView1.MasterGridViewTemplate.Columns.FindByDataField("Country").ConditionalFormattingObjectList.Add(c1)

Thanks

Joe

1 Answer, 1 is accepted

Sort by
0
Accepted
Boryana
Telerik team
answered on 05 Jun 2009, 08:07 AM
Hello Joe Bohen,

In order to the clear the ConditionalFormattingObject, you should remove the  previously added items. Please add the following snippet to your code:

radGridView1.MasterGridViewTemplate.Columns.FindByDataField("Country").ConditionalFormattingObjectList.Remove(con1) 

I hope this helps. If you have further questions, do not hesitate to contact us back.

Sincerely yours,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Joe Bohen
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or