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

How to display grid line in C# that has no data?

1 Answer 418 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mohsen
Top achievements
Rank 1
mohsen asked on 02 Mar 2016, 10:03 AM
I have data grid , When the form loads, the grid is just an empty because there are no data . Is there any way to display the grid lines when there are no data ? like that excell page. Thank you!

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Mar 2016, 12:09 PM
Hello Mohsen,

Thank you for writing.

By default, no data is displayed in the grid. You can control whether the no data message will be shown by using the ShowNoDataText property. However, in order to show the grid lines, you should add dummy records to the RadGridView.Rows collection.

I would recommend you to have a look at our Demo application >> GridView >> Spreadsheet example which demonstrates a sample approach how to add empty rows and style to show the grid lines. The Demo application is usually located in the installation folder of the WinForms suite: C:\Program Files (x86)\Telerik\UI for WinForms Q1 2016\Examples\QuickStart\Bin

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
mohsen
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or