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

Dragging RadGridView from RIA Data Source does not produce the column xaml

6 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sir
Top achievements
Rank 1
Sir asked on 07 Jun 2010, 10:54 PM

Posted on Jun 3, 2010 (permalink)

I am using VS2010 Ultimate with RIA Services,
 and Telerik Silverlight 2010.1.0603.1040

When I open my Data Sources tab in VS, and drag a database table (MS Data Grid) into the designer -
The xaml is automatically written out with the grid and each column from the table.
I can also go into the grid properties, click on the columns ellipse button, and edit each of the data columns from the table.

Now, when I change my data sources tab to generate a RadGridView by default, and drag the same table into the designer -
The xaml only shows a radgridview - there are no <telerik:RadGridView.Columns/> written out.
If I go into the radgrid properties, click on the columns ellipse button, there are no entries.

Is there a way to get the radgridview to write out each column, and I'm just not doing something correctly?
Otherwise, are there plans to add this functionality later?

My company wants to go with RIA data sources, and it will be hard for me to convince the company to continue using Telerik controls when I have to tell them that each developer will need to add the <telerik:RadGridView.Columns/> xaml by hand.

Generated by dragging a MS Data Grid into the designer:
<sdk:DataGrid Grid.Row="0" AutoGenerateColumns="False" ItemsSource="{Binding ElementName=eventDomainDataSource, Path=Data}" Margin="12,0,12,12" Name="eventDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected">  
    <sdk:DataGrid.Columns> 
        <sdk:DataGridTextColumn x:Name="eventTitleColumn" Binding="{Binding Path=EventTitle}" Header="Event Title" Width="SizeToHeader" MinWidth="250" /> 
        <sdk:DataGridTemplateColumn x:Name="eventStartDateColumn" Header="Event Start Date" Width="SizeToHeader">  
            <sdk:DataGridTemplateColumn.CellEditingTemplate> 
                <DataTemplate> 
                    <sdk:DatePicker SelectedDate="{Binding Path=EventStartDate, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true}" /> 
                </DataTemplate> 
            </sdk:DataGridTemplateColumn.CellEditingTemplate> 
            <sdk:DataGridTemplateColumn.CellTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding Path=EventStartDate, StringFormat=\{0:d\}}" /> 
                </DataTemplate> 
            </sdk:DataGridTemplateColumn.CellTemplate> 
        </sdk:DataGridTemplateColumn> 
        <sdk:DataGridTemplateColumn x:Name="eventEndDateColumn" Header="Event End Date" Width="SizeToHeader">  
            <sdk:DataGridTemplateColumn.CellEditingTemplate> 
                <DataTemplate> 
                    <sdk:DatePicker SelectedDate="{Binding Path=EventEndDate, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true}" /> 
                </DataTemplate> 
            </sdk:DataGridTemplateColumn.CellEditingTemplate> 
            <sdk:DataGridTemplateColumn.CellTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding Path=EventEndDate, StringFormat=\{0:d\}}" /> 
                </DataTemplate> 
            </sdk:DataGridTemplateColumn.CellTemplate> 
        </sdk:DataGridTemplateColumn> 
        <sdk:DataGridTextColumn x:Name="eventVenueNameColumn" Binding="{Binding Path=EventVenueName}" Header="Event Venue Name" Width="SizeToHeader" MinWidth="200" /> 
        <sdk:DataGridTextColumn x:Name="eventDescriptionColumn" Binding="{Binding Path=EventDescription}" Header="Event Description" Width="*" /> 
    </sdk:DataGrid.Columns> 
</sdk:DataGrid> 
 

Generated by dragging a Telerik RadGridView into the designer:
<telerikPresentation:RadGridView Grid.Row="1" ItemsSource="{Binding ElementName=eventDomainDataSource, Path=Data}" Margin="12,0,12,12" Name="eventDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" /> 

Thanks,
Ray

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Jun 2010, 12:15 PM
Hello Ray,

Please check my answer on your other post here.

Greetings,
Vlad
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
Sir
Top achievements
Rank 1
answered on 08 Jun 2010, 08:45 PM
Hi Vlad,

When I try to visit the other post in your link, I only get "Server Error".
Reloading the page does not work for me.

But I was able to get your reply from the automated email, thanks.
I will vote on the PITS link you gave me.

Oops...  
It seems there was a problem with our server.  
Try reloading the page.  
 

Having the columns automated could be fine too - but I would like to have some control over some of the input elements,
re: date fields: I would like to style the calendar pop up (say to not show the week #), etc.
and what if time entry is as important as the date entry?

Can you throw me a link to any help page dealing with those types of topics?
Thanks,
Ray
0
Pana
Telerik team
answered on 14 Jun 2010, 04:59 PM
Hello Sir,

The RadDatePicker has:

AreWeekNamesVisible="False"
AreWeekNumbersVisible="False"

properties which you can use. You should be able to set the EditorStyle to hide these columns.

Kind regards,
Panayot
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
Sir
Top achievements
Rank 1
answered on 15 Jun 2010, 10:20 PM
Thanks Panayot -
I understand the datepicker has the AreWeekNumbersVisible="False" property.

My question though was how do I set that property to false on the "createdDateColumn" in the following grid xaml example:

                                            <telerikXmlns:RadGridView x:Name="lkpChannelDataGrid" Grid.Row="0" TabIndex="5" ItemsSource="{Binding ElementName=lkpChannelDomainDataSource, Path=Data}"  CanUserFreezeColumns="False" AutoGenerateColumns="False" IsReadOnly="False" ShowGroupPanel="False" Margin="0" RowDetailsVisibilityMode="VisibleWhenSelected" Canvas.ZIndex="1" SelectionMode="Single">  
                                                <telerikXmlns:RadGridView.Columns> 
                                      
                                                    
                                                    
                                                    
                                                    <telerikXmlns:GridViewDataColumn x:Name="createdDateColumn" Header="Created Date" DataMemberBinding="{Binding CreatedDate}" IsGroupable="False" IsSortable="True" IsReorderable="False" IsFilterable="False" /> 
                                                    
                                                    
                                                </telerikXmlns:RadGridView.Columns> 
                                            </telerikXmlns:RadGridView> 
 

i.e. when the user clicks into that grid date column and clicks on the calendar icon to edit, how do I get the week numbers to be hidden.

Thanks,
Ray
0
Rudy
Top achievements
Rank 1
answered on 16 Jun 2010, 01:31 AM
Hi Vlad,

you wrote: 'Please check my answer on your other post here.'


I also get a 'Server Error' when I click the link and reloading does not solve it. How can I get access to this post?

Regards
Rudy
0
Vlad
Telerik team
answered on 16 Jun 2010, 06:09 AM
Hello Rudy,

 Here is the correct link:
http://www.telerik.com/community/forums/silverlight/gridview/radgridview-amp-ria-data-sources.aspx

Greetings,
Vlad
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.
Tags
GridView
Asked by
Sir
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sir
Top achievements
Rank 1
Pana
Telerik team
Rudy
Top achievements
Rank 1
Share this question
or