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

Error Provider

3 Answers 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deborah
Top achievements
Rank 1
Deborah asked on 25 May 2011, 12:34 AM
I just converted one of my grids from a DataGridView to the RadGridView and have a feature that no longer works.

The user is required to enter at least one row in the grid. If the user does not enter at least one row, we add an error icon to the grid itself (NOT a row or cell). With a DataGridView, it then appeared on the righ side of the grid. With the RadGridView, it does not appear.

Here is the line of code:

ErrorProvider1.SetError(radgridview1,

 

"This is a test")

Any ideas how to make this work?

Thanks!

 

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 25 May 2011, 04:52 PM
Hi Deborah,

Currently, this scenario is not supported by RadGridView. I added it as a feature request and it will be implemented in one of our upcoming releases. I updated also your Telerik points. You can display an error text in RadGridView by setting the Text property of GridTableElement. Please consider the following sample:
Me.radGridView1.TableElement.Text = "This is a test"

If you have any further questions, I will be glad to assist you.

Regards, Jack
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Deborah
Top achievements
Rank 1
answered on 25 May 2011, 04:58 PM
Thank you for your reply.

I added the line of code you provided and the text did not seem to appear anywhere?

For now, to get the UI to look like it did with the Microsoft grid, I just added a label (with no text) to the right of the grid. I then use the label in the SetError call.

I look forward to seeing this feature in an upcoming release.

Thanks again!
0
Jack
Telerik team
answered on 27 May 2011, 02:54 PM
Hello Deborah, 

This text will appear in the middle of RadGridView when there are no rows. If you want to show a label on top of RadGridView, then you should add a RadLabel control on your form and place it at the desired position. I am attaching a screenshot which shows the result from the code snippet from my previous post. I hope it helps.

If you need further assistance, I will be glad to help.

Best wishes,
Jack
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
Deborah
Top achievements
Rank 1
Answers by
Jack
Telerik team
Deborah
Top achievements
Rank 1
Share this question
or