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

How to hide default validation ToolTip of RadGridView

1 Answer 317 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Narendar
Top achievements
Rank 1
Narendar asked on 04 May 2015, 03:01 PM
Hi, I am using RadGridView to show the grid data. In CellValidating event handler I am validating the data and setting e.IsValid=false if data is not valid. It's displaying the red border and an empty tool tip on the corresponding cell. But I just need to display the red border if there is any invalid data. Can you tell me how can I do this, also provide any sample if there is any?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 May 2015, 08:19 AM
Hello Narendar,

For such customization you need to modify the template of the control. The proper way to achieve this is via Implicit Styles with NoXAML binaries. Please check the Setting a Theme(Using Implicit Styles) for more information on the matter.

Modifying/removing the Validation tooltip depends on which validation approach is being used. You can check the Validating article for more information on the different types of data validation that RadGridView supports.

In your case, since you validate data using CellValidating event, the validation is being performed in edit mode. In such scenario the Validation tooltip depends on GridViewEditorPresenter element. The different elements on which the Validation tooltip depends are described in the Styling Validation Tooltips article.

So, for removing the Validation tooltip, please search for ControlTemplate with x:Key="GridViewEditorPresenter_ValidationToolTipTemplate". It is located in Telerik.Windows.Controls.xaml file. Within it you need to remove all VisualStateGroups inside VisualStateManager.VisualStateGroups.

I hope this helps.

Best Regards,
Stefan
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Narendar
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or