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

[Browsable(false)] attribute

1 Answer 304 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ariel Vargas
Top achievements
Rank 1
Ariel Vargas asked on 29 Sep 2016, 02:09 PM

We've a custom object with several properties. When implementing the RadDataEntry control for visualizing details of each record displayed in GridView, we want to hide some properties. We implemented the [Browsable(false)] attribute and that hides the property in the RadDataEntry as expected, however it also impacts in the Grid. Is there a way to display a property in the Grid and hide it in the DataEntry?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 Sep 2016, 09:58 AM
Hello Ariel,

You can use the EditorInitializing event instead of the attribute:
private void RadDataEntry1_EditorInitializing(object sender, Telerik.WinControls.UI.EditorInitializingEventArgs e)
{
    if (e.Property.Name == "LastName")
    {
        e.Cancel = true;
    }
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
GridView
Asked by
Ariel Vargas
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or