Telerik Forums
UI for WPF Forum
3 answers
142 views

Hi! I have a project with a RadGrid table showing information. I have this snippet of code inside it:

<telerik:GridCalculatedColumn DataFields="Stake,TotalGames" Expression="iif({1} = 0, 0, {0}/{1})"
FilterControlWidth="40px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"
UniqueName="AvgBet" DataFormatString="{0:N2}" HeaderText="Avg Bet (Real)" DataType="System.Decimal"
Aggregate="Avg" FooterStyle-HorizontalAlign="Right" />

 

Now, this works with English and Chinese locale settings. However, when we set the locale to ES, the formatting changes (from 0.00 to 0,00), and we believe that the problem is coming from the Expression in the code. We think that it might be that the values were interpreted as string? It works with English and Chinese locale (maybe because of the standard number decimal formatting).

 

We have tried these approaches but to no avail:

1. On binding data (OnNeedDataSource), we modify the locale like this:

 if (dtable.Locale.ToString().Substring(0,2) == "es")
      {
        System.Globalization.CultureInfo myCultureInfo = new System.Globalization.CultureInfo("en-gb");
        dtable.Locale = myCultureInfo;
      }

However, this still shows the same problem. 

 

2. We tried this as well (IsLocalizationLanguageRespected set to true or false): 

<telerik:RadGrid ID="grdSessions" runat="server" GridLines="None" AllowFilteringByColumn="True"
          PageSize="50" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
          GroupHeaderItemStyle-Font-Bold="true" GroupHeaderItemStyle-ForeColor="Black"
          EnableHeaderContextMenu="True" OnNeedDataSource="grdSessions_NeedDataSource"
          Width="98%" ShowFooter="true" IsLocalizationLanguageRespected="false">

We are not sure how to approach this one next. Can you give me suggestions on how to proceed? 

 

Thank you!
Psalm

Konstantin Dikov
Telerik team
 answered on 04 Oct 2016
1 answer
111 views

Hi ,

 what is LookUpPropertyDefinition ?? when Can we use it?Can you provide some document which explains and example.

Regards,

Nagasree.

Stefan
Telerik team
 answered on 04 Oct 2016
1 answer
272 views

Hello

Do you provide source code for Outlook-Inspired Application?

 

Thank you

Yana
Telerik team
 answered on 04 Oct 2016
6 answers
416 views

I'm trying to load a collection (which is an attribute of an object) into a RadComboBox (instead of just having the id / ToString inside a textbox).

I got this working so far with a datatemplate which I apply inside the AutoGeneratingPropertyDefinition Handler.

 

DataTemplate dt = (DataTemplate)this.FindResource("TemplateComboBoxTemplate");                 
e.PropertyDefinition.EditorTemplate = dt;

The template looks like the following:
<DataTemplate x:Key="TemplateComboBoxTemplate">     
    <
telerik:RadComboBox ItemsSource="{Binding Source={StaticResource TemplateComboBoxSource}, Path=Templates}"
                        Margin="0">
        <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>           
                <TextBlock Text="{Binding Title}" />         
            </DataTemplate>       
        </telerik:RadComboBox.ItemTemplate>     
    </telerik:RadComboBox>   
</DataTemplate>

As I said, the above works great, except that I have no idea how to set up a two way binding
so that the RadComboBox actually reflects the property.
Stefan
Telerik team
 answered on 04 Oct 2016
7 answers
302 views
I am using RadCartesianChart to display stacked grouped bar chart shown in the attachment. I searched forums to get an idea and also looked at the demo source code, but I am not able to get it to work. I am using MVVM. Please show me a sample project using MVVM that will be able to do this.

Thanks,
John
Artem
Top achievements
Rank 1
 answered on 03 Oct 2016
1 answer
211 views

Hi,

   In PropertyGrid I have one property "MethodName" of type string.I have to provide a custom editor of type RadComboBox for which the datasource will be dynamically getting  methodnames from one particular dll. Once the user selects one methodname from combobox it should be binded to  MethodName Property.

 

In Winforms it is easily acheivable using TypeConverters as they Pass ITypeDescriptorContext.

 

How to achieve this requirement in RadPropertyGrid.I have similar properties 10 or 11.So please suggest something so that I can move forward.

 

Regards,

Nagasree

Stefan
Telerik team
 answered on 03 Oct 2016
5 answers
184 views
Is it possible to allow users at runtime to resize a RadPanelBarItem? For example, if I have 4 RadPanelBarItems (see the WPF Controls Example) and I have ExpandMode set to multiple, I would like to allow my users to change the height of each expanded RadPanelBarItem. Maybe have a grip control between each RadPanelBarItem such what is shown in a WPF Grid when using the WPF GridSplitter control...
Martin Ivanov
Telerik team
 answered on 03 Oct 2016
1 answer
92 views
I have:

StyleManager.ApplicationTheme = new GreenTheme(GreenPalette.ColorVariation.Light);

and get "GreenTheme is inaccessible due to its protection level".

It appears to be declared as public. 

This works:

StyleManager.ApplicationTheme = new Office_BlueTheme();

Any samples of applying the Green Theme?  Or ideas?

thanks,

Robert

Martin
Telerik team
 answered on 03 Oct 2016
3 answers
288 views

What's the easyest way to draw someting like a combined geometry in a map? http://www.blackwasp.co.uk/WPFCombinedGeometry.aspx

I have a series of ellipse with a trasparency, but, when 2 or more ellipse are overlapped the opacity are reduced and I can't see the map below.

I just want to combile all the geometry and have a unique item..

Martin Ivanov
Telerik team
 answered on 03 Oct 2016
8 answers
1.1K+ views
I'm trying to override or remove the ability to click directly on the content of a DesktopAlert. My problem is that when you set the alert's content to a plain string, it acts as a link-button and upon clicking the text, it will close the window. This is a problem since there are certain DesktopAlerts that I don't want to be closed at all. I can set it as Enabled = False but then the dropdown menu and other parts of the alert quit functioning. This is all created from code behind so it is a little harder for me to set any properties or templates for it in XAML.

Dim mainAlert = New RadDesktopAlert() With {
    .Header = "Messages",
    .Content = "You have " & unreadCount & " new messages",
    .Height = 75,
    .Width = 300,
    .IconTemplate = TryCast(Application.Current.FindResource("radIconTemplate"), DataTemplate),
    .IconColumnWidth = 30,
    .IconMargin = New Thickness(5, 10, 15, 0),
    .CanAutoClose = False,
    .ShowCloseButton = False,
    .Tag = "main",
    .ShowMenuButton = True,
    .MenuItemsSource = GetDesktopAlertMenuItems
}
manager.ShowAlert(mainAlert)
Nasko
Telerik team
 answered on 03 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?