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

2 posts, 0 answers
  1. mohsen
    mohsen avatar
    3 posts
    Member since:
    Mar 2015

    Posted 02 Mar 2016 Link to this post

    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!
  2. Dess
    Dess avatar
    2174 posts

    Posted 02 Mar 2016 Link to this post

    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.
    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
Back to Top