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

showing empty row in the telerik grid

8 Answers 588 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hassan Mohaideen
Top achievements
Rank 1
Hassan Mohaideen asked on 15 Dec 2010, 02:34 PM

Hi Guys,

 

In our WPF application, we need to show the empty rows in the grid based on the grid size before loading the data from the database. Currently it is not showing the empty rows in the grid. We used component one grid in our previous application. By default that control show the empty rows before loading the data. How can we achieve this showing empty row in the telerik grid without data?

 

I would appreciate your help. Thanks in advance

Raja

8 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 15 Dec 2010, 02:38 PM
Hello,

 You can bind the grid to collection with desired number of empty rows. 

All the best,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Hassan Mohaideen
Top achievements
Rank 1
answered on 15 Dec 2010, 03:01 PM

We cannot define the rows initially since it is dynamic and we want to have the rows based on need and it may vary screen to screen (each screen may have more than one grid). For all these grids, we cannot define the row count.

 

We need the following feature:

 

  1. When I try to show 3 records in the grid size of 5, then 2 empty rows must be there.
  2. When I try to show 10 records in the grid size of 5, then there should not be any empty row displayed.
  3. Moreover as you suggested, we have defined the grid rows as 10 and loaded 20 records. But still it shows 10 empty records after displaying the 20 records.

But we do not have any above said issues in the component one. Please clarify these with sample codings

0
Vlad
Telerik team
answered on 15 Dec 2010, 03:10 PM
Hi,

 The grid does not have such built-in internal logic and that is why it is up to you to implement this in your data model and bind this data to the grid as I've suggested in my previous reply. 

Kind regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Patrick
Top achievements
Rank 1
answered on 23 Mar 2011, 01:46 PM
Hello,

is there any plan or suggestion how to resolve this issue?
We are planning to move our app from WinForms (with Infragistics) to WPF (with Telerik) and in the Infragistics UltraGrid there is such a functionality...

Best Regards,
Patrick
0
Vlad
Telerik team
answered on 23 Mar 2011, 03:06 PM
Hi,

 We have now virtual collection and if you bind the grid to such collection you will get similar behavior. Please check our Silverlight demos here - the WPF demos are same. 

Kind regards,
Vlad
the Telerik team
0
Patrick
Top achievements
Rank 1
answered on 24 Mar 2011, 01:56 PM
Hi again,

the behaviour in the sample is not the requested one.
We want the grid to display empty rows up to the bottom (without scrollbar) only if there are less records than the grid can display without scrollbar (without setting a special property which indicates the number of needed rows to fill up the grid).

Best regards,
Patrick
0
JC
Top achievements
Rank 1
answered on 01 Apr 2013, 03:49 PM
Hi,

This problem was solved? I need to do the same
0
Dimitrina
Telerik team
answered on 03 Apr 2013, 07:02 AM
Hello,

I am afraid that the RadGridView does not support such functionality out-of-the box. What we can suggest would be to calculate the number of empty rows you need and then fill the grid to collection with desired number of those rows. 
 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Hassan Mohaideen
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Hassan Mohaideen
Top achievements
Rank 1
Patrick
Top achievements
Rank 1
JC
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or