Telerik Forums
UI for WPF Forum
1 answer
468 views
Hi,
I have a GridView with binding to an ObservableCollection in the ViewModel.
The GridView DataLoadMode is set to Asynchronous.
When removing an item from the ObservableCollection in the ViewModel, the GridView is not refershed and item is still shown.
If I set DataLoadMode as synchronous , It works fine.

<telerik:RadGridView  
  x:Name="RadGridViewGroups" 
  Grid.Row="1" 
  AutoGenerateColumns="False" 
  DataLoadMode="Asynchronous" 
  IsReadOnly="True"           
  ItemsSource="{Binding Groups}" > 

public class GroupsViewModel : INotifyPropertyChanged  
{         
    public ObservableCollection<TradingGroup> Groups  
    {  
        get 
        {  
            return m_Groups;  
        }  
        set 
        {  
            m_Groups = value;  
            PropertyChanged.OnPropertyChanged(this"Groups");  
        }  
    }  


Thanks,
Noam Shoeg



Vlad
Telerik team
 answered on 12 Aug 2009
2 answers
166 views
Hy
I add a CheckBox  column to my grid
and now there is no border to the column
this is the code

<telerik:RadGridView.Resources> 
                    <ControlTemplate x:Key="cellTemplate" TargetType="{x:Type telerik:GridViewCell}">  
                        <CheckBox IsChecked="{Binding Field.Record.Data.Add, RelativeSource={RelativeSource TemplatedParent}}"   
                                                    HorizontalAlignment="Center" VerticalAlignment="Center" /> 
                    </ControlTemplate> 
                    <Style x:Key="booleanCellStyle">  
                        <Setter Property="telerik:GridViewCell.Template" Value="{StaticResource cellTemplate}" /> 
                    </Style> 
                    </telerik:RadGridView.Resources> 

 <telerik:RadGridView.Columns> 
                        <telerik:GridViewDataColumn UniqueName="Add" Header="" Width="Auto" CellStyle="{StaticResource booleanCellStyle}"/>  
                     

Thanks.
Orit
Top achievements
Rank 1
 answered on 12 Aug 2009
8 answers
182 views
Hi,
I am using RadCarousel in WAP Browser Application. I am calling this control in webpart using IFrame tag to run on sharepoint site.
when I deploy it I am getting follwoing error

PLATFORM VERSION INFO
    Windows             : 5.2.3790.131072 (Win32NT)
    Common Language Runtime     : 2.0.50727.3053
    System.Deployment.dll         : 2.0.50727.3053 (netfxsp.050727-3000)
    mscorwks.dll             : 2.0.50727.3053 (netfxsp.050727-3000)
    dfshim.dll             : 2.0.50727.3053 (netfxsp.050727-3000)

SOURCES
    Deployment url            : http://rell:1234/NewXbaps/WPFCarousel03.xbap
    Application url            : http://rell:1234/NewXbaps/WPFCarousel03.exe.manifest

IDENTITIES
    Deployment Identity        : WPFCarousel03.xbap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=09b4372df65d1401, processorArchitecture=msil
    Application Identity        : WPFCarousel03.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=09b4372df65d1401, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
    * Online only application.
    * Browser-hosted application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * An exception occurred while downloading the application. Following failure messages were detected:
        + Downloading http://rell:1234/NewXbaps/WPFCarousel03.exe did not succeed.
        + The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE.
    * An exception occurred while determining trust. Following failure messages were detected:
        + User has refused to grant required permissions to the application.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    No phase information is available.

ERROR DETAILS
    Following errors were detected during this operation.
    * [2/25/2009 6:29:45 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading http://rell:1234/NewXbaps/WPFCarousel03.exe did not succeed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
            at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
            at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.DeploymentManager.SynchronizeCore(Boolean blocking)
            at System.Deployment.Application.DeploymentManager.SynchronizeAsyncWorker()
        --- Inner Exception ---
        System.Net.WebException
        - The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE.
        - Source: System
        - Stack trace:
            at System.Net.HttpWebRequest.GetResponse()
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    * [2/25/2009 6:29:46 PM] System.Deployment.Application.TrustNotGrantedException (Unknown subtype)
        - User has refused to grant required permissions to the application.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
            at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
            at System.Deployment.Application.DeploymentManager.DetermineTrust(TrustParams trustParams)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements(Boolean grantApplicationTrust)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements()
            at MS.Internal.AppModel.XappLauncherApp.AssertApplicationRequirementsAsync(Object unused)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.


can you tell me what changed i need to do?

Thanks
Vandana
Vlad
Telerik team
 answered on 12 Aug 2009
4 answers
112 views
Hi.
Small problem:
Imagine a class setup of:
public class DisplayData 
   public string Name { getset; } 
   public SomeOtherClass Prop { getset; } 
 
public class SomeOtherClass  
   public string OtherName { getset; } 

Now I have an ObservableCollection<DisplayData> to display in my Grid.
Problem is the following setup does no display SomeOtherClass nicely (how should it...)
<telerik:GridViewDataColumn  
     Header="Name" 
     DataMemberBinding="{Binding Path=Name, Mode=OneWay}" 
     Width="2*" 
     IsReadOnly="True"/> 
<telerik:GridViewDataColumn  
     Header="Other" 
     DataMemberBinding="{Binding Path=Prop, Mode=OneWay}" 
     Width="3*" 
     IsReadOnly="True"/> 

If I change the second column like this:
<telerik:GridViewDataColumn   
     Header="Name"  
     DataMemberBinding="{Binding Path=Name, Mode=OneWay}"  
     Width="2*"  
     IsReadOnly="True"/>  
<telerik:GridViewDataColumn   
     Header="Other"  
     DataMemberBinding="{Binding Path=Prop.OtherName, Mode=OneWay}"  
     Width="3*"  
     IsReadOnly="True"/>  

All displays fine. However I loose the Ability to Filter/Group the second column.
I am searching for something like:
<telerik:GridViewDataColumn    
     Header="Name"   
     DataMemberBinding="{Binding Path=Name, Mode=OneWay}"   
     Width="2*"   
     IsReadOnly="True"/>   
<telerik:GridViewDataColumn    
     Header="Other"   
     DataMemberBinding="{Binding Path=Prop, Mode=OneWay}" 
     DisplayMemberPath="OtherName"   
     Width="3*"   
     IsReadOnly="True"/>   

And I can't seem to find any solution..

I seem to walking in the dark here.. so could someone please enlighten me ?

Yours,
Nils
Nils
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
185 views
Hello everybody.

We have a RadGridView with 4 columns: 2 are simply text column, while 2 have a button.

The problem we can't figure out is: how we can know the row index number (=item) starting from the button click event?

Thank you for your cooperation.

Attilio Gelosa.
Vlad
Telerik team
 answered on 11 Aug 2009
7 answers
317 views
I am creating tabs on the fly and need to be able to apply a theme to the actual RadTabItem.

I have tried the following with no success:
1) tab1.SetValue(Telerik.Windows.Controls.StyleManager.ThemeProperty, new VistaTheme());
2) Telerik.Windows.Controls.StyleManager.SetTheme(tab1, new VistaTheme());

tab1 is the tab I created:
RadTabItem tab1 = new RadTabItem();

Also, I cannot apply the theme to an existing tab (within the actual XAML) dynamically either.  If a RadTabItem exists with name "tab2" on the xaml form and I try and go and programatically apply a theme somewhere in the code it does not apply at all...

Any help with this would be great.  I really need to be able to apply themes on the fly to dynamically created telerik objects.

Thanks

 

Bobi
Telerik team
 answered on 11 Aug 2009
4 answers
109 views
Hy
How can I make the width of the grid to be strech on all window width?
Thanks
Orit
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
211 views
If a I create a simple form with just a RadGridView control:

<Grid>
        <telerik:RadGridView Name="radGridView1"/>
</Grid>

As I resize the window, the grid streches with the window and vertical/horizontal scrollbars appear if there's any extra rows/columns in the grid.  But if I change the container to a canvas:

<Canvas>
        <telerik:RadGridView Name="radGridView1"/>
</Canvas>

Then any overflow is hidden.  Even if I wrap the RadGridView in it's own grid under the canvas no scrollbars appear.  This seems to happen if there's a canvas element anywhere in the container hierarchy.  
Hristo
Telerik team
 answered on 10 Aug 2009
1 answer
126 views
Working with: Version 2009.1.526.35

Trying to set SelectedItem.
Code:

<telerik:RadGridView AutoGenerateColumns="False"
                             SelectedItem="{Binding Path=Entity, Mode=TwoWay}" IsReadOnly="False"
            ItemsSource="{Binding Path=Entities}"

In my constructor of my model I create a instance of Entity (Selected) and a List of Entities(ItemSource).

When I run, I get a Object Reference not Set... exception.
The same code works fine with a ListBox.

Rossen Hristov
Telerik team
 answered on 10 Aug 2009
1 answer
176 views
Hy
I want to add a Radio button column to my grid
I used the follwing code
how can I let only one radio button to be select
(a kind of a radio button group)
Thanks

<telerik:RadGridView.Resources> 
                        <ControlTemplate x:Key="cellTemplate1" TargetType="{x:Type telerik:GridViewCell}">  
                            <RadioButton IsChecked="{Binding Field.Record.Data.RB, RelativeSource={RelativeSource TemplatedParent}}"   
                                            HorizontalAlignment="Center" VerticalAlignment="Center"  /> 
                        </ControlTemplate> 
                        <Style x:Key="RBbooleanCellStyle">  
                            <Setter Property="telerik:GridViewCell.Template" Value="{StaticResource cellTemplate1}" /> 
                        </Style> 
                    </telerik:RadGridView.Resources> 
Orit
Top achievements
Rank 1
 answered on 10 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?