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

RadGridView rows padding

6 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adrian Pay
Top achievements
Rank 1
Adrian Pay asked on 09 May 2011, 08:40 AM
Hi,

Is it possible to add row paddings of 10 (meaning if i have 7 rows, i'll pad 3 empty rows), while the itemsource of my radgridview is binded to a domainDatasource control?

Thanks

6 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 09 May 2011, 08:49 AM
Hello Adrian,

 
You may override the default Padding of GridViewRow using a simple style:

<Style x:Key="style1" TargetType="telerik:GridViewRow">
        <Setter Property="Padding" Value="30"/>
</Style>


Based on some custom logic you may assign this style to the rows you need. 
Please let me know how this works for you!


Kind regards,
Vanya Pavlova
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Adrian Pay
Top achievements
Rank 1
answered on 09 May 2011, 09:46 AM
Hi,

This did not work for me, what i wanted is to create empty rows dynamically that will serve as my padding, for example my domaindatasurce only returned 7 row, but i want to maintain a 10 rows per grid format, what i want to do is to pad 3 more empty items.

Is this possible eventhough my itemssource property is binded to a damoandatasource?

thanks!
0
Vanya Pavlova
Telerik team
answered on 09 May 2011, 09:55 AM
Hello Adrian,



Please accept my aplogoy for the misunderstanding! In this case just create the desired numer of empty items and insert them at a specified position through calling RadGridView.Items.Insert(index, item).
Hope this helps!


Best wishes,
Vanya Pavlova
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Adrian Pay
Top achievements
Rank 1
answered on 09 May 2011, 10:07 AM
Hi,

"Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead." is the error message i will receive if i try to do your solution. my item source is binded, and im using the DomainDatasource control. Is there any event i can subscribe to or any property i can set to modify UI object after binding in which this error message will not show up?

Thanks
0
Vanya Pavlova
Telerik team
answered on 09 May 2011, 11:48 AM
Hi Adrian,

 

You may take a look at the following forum thread.


Best wishes,
Vanya Pavlova
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Adrian Pay
Top achievements
Rank 1
answered on 09 May 2011, 11:59 AM
Hi Vanya,

I will look into the link, thanks for your help!

Regards
Tags
GridView
Asked by
Adrian Pay
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Adrian Pay
Top achievements
Rank 1
Share this question
or