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

[Solved] Validation on GridView when zero rows

1 Answer 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lance
Top achievements
Rank 1
Lance asked on 21 Jan 2011, 05:55 AM
Hi,
I've got a page with various controls that are bound to an object and which use the standard validation controls to display any binding errors.  I also have a small telerik gridview control whose itemssource is set to a property of the aforementioned object.  This property has a datatype of List<object> as there is a one - many relationship.  They are not databound the itemssource property is set.  What I would like to achieve is to show a validation message around the gridview if the gridview doesn't contain any records and the validation disappearing if a row is entered into the gridview.  I would like gridview to be surrounded by a red border and the tooltip to be a red box with white text so it looks like the other validations on the page.

Is this possible?  If so, please help.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 26 Jan 2011, 09:52 AM
Hi Tim English,

RadGridView doesn't support such scenarios out of the box. However you could achieve this by surrounding RadGridView with a red border which will become visible when RadGridView is invalid (has no items). Also you could take a look at this blog post for another possible solution.

Regards,
Nedyalko Nikolov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Lance
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or