Telerik Forums
UI for WPF Forum
3 answers
197 views
Within DistinctValuesLoading(), I added 3 new strings to distinct values: [2], [4] and [6].
Their purpose is to filter by length, e.g. [2] should only show rows that have a string of length 2 in this column.

Is their any way to achieve this in Filtering() event ?
Or is their another way to reach my goal ?
Stephan
Top achievements
Rank 1
 answered on 20 Apr 2012
1 answer
96 views
My application is built in WPF.  I have a class called "MyWindow" that descends from the WPF Window class.  I have another class called "MyDialog" that also descends from the WPF Window class.  These two classes have a uniform look and functionality so it made sense to create my own base classes for the applicaiton.  The application is to be used on touch screen equipped laptops in police cars, so I've made everything bigger, to make it easier for people with large fingers to interact with the application.

My application has a login dialog that descends from the MyDialog class.  During program startup, the application performs a number of steps, including loading a resource dictionary that contains brushes that are used to draw the application's controls.  Again, part of the whole unified look.

The login dialog has a RadComboBox on it.  The app.xaml has a custom template for RadComboBoxes that increases the width of   the drop down button on the control.  The first time the login dialog is displayed, however, this template is not applied; the drop down button is the normal width.  However, if you enter a wrong password & click login, the dialog is redrawn and this time the drop down button is the right width.

Why is the width of the RadComboBox wrong the first time but right the second time, even though every other aspect of the dialog is drawn right the first time?  I don't even know what code to include to help you guys help me on this.  Any ideas?

Tony
Dani
Telerik team
 answered on 20 Apr 2012
1 answer
161 views
Hi,

After encountering a few performance issues with the Dynamic Layer, would like some clarification on best practices of using the Dynamic Layer.

The following 2 forum posts are from 2010 - http://www.telerik.com/community/forums/wpf/map/working-with-dynamic-layers-and-mapshapereaders.aspx and http://www.telerik.com/community/forums/wpf/map/radmap-dynamiclayer-performance-problem.aspx

I am currently using the below code to only return those geometries which are in the current extents, rather then dealing with this at a fairly low level, does the Dynamic Layer have any of this functionality included?

Many thanks,

Adnan

public void ItemsRequest(object sender, ItemsRequestEventArgs e)
{
    IList<SqlGeometry> geometryList = new List<SqlGeometry>();
 
    LocationRect currentRegion = new LocationRect(e.UpperLeft, e.LowerRight);
 
    string sql = string.Format("SELECT the_geom FROM Locations WHERE the_geom.STIntersects(geometry::STGeomFromText('POLYGON(({0} {1}, {2} {3}, {4} {5}, {6} {7}, {0} {1}))', 0)) = 1 ", currentRegion.Southwest.Longitude, currentRegion.Southwest.Latitude, currentRegion.Northwest.Longitude, currentRegion.Northwest.Latitude, currentRegion.Northeast.Longitude, currentRegion.Northeast.Latitude, currentRegion.Southeast.Longitude, currentRegion.Southeast.Latitude);
 
    using (SqlConnection sqlConnection = new SqlConnection(connectionString))
    {
        sqlConnection.Open();
         
        using (SqlCommand sqlCommand = new SqlCommand(geographicalBoundsSQL, sqlConnection))
        {
            using (SqlDataReader reader = sqlCommand.ExecuteReader())
            {
                while (reader.Read())
                {
                    SqlGeometry sqlGeometry = (SqlGeometry)reader["the_geom"];
                    geometryList.Add(sqlGeometry);
                }
            }
        }
    }
Andrey
Telerik team
 answered on 20 Apr 2012
1 answer
111 views
Hello,

Is it possible to add a click event to the time event so that we can navigate user to different pages if they click on the time event in timeline?

Thanks

Apurva
Tsvetie
Telerik team
 answered on 20 Apr 2012
1 answer
160 views
Hi There, 

We have a requirement for lots of different buttons with their appropriate look and feel. I have created my own Theme where the buttons would each take on their own style, The required behavior would be to have our own style for each of the buttons, however, if one of your themes were chosen, then it would just use that for each Button Style,

The buttons all inherit from RadButton, However, When we use our own Theme, the buttons look the way they should in design time. eg ButtonType1 =  Green, ButtonType2 = Red, NormalRadButton = Orange. However, when I then run the application all the buttons change to the NormalRadButton of Orange. This would be the required behavior when using a Telerik theme.

I have a small demo app that shows the behavior, however, you don't seem to allow these type of uploads, I have attached screen shots of the demo app, 

I could send you the demo app if required

Thanks,

Yuri

 
Tina Stancheva
Telerik team
 answered on 20 Apr 2012
2 answers
91 views
hi,

Is there a way for masking the months of year

like for example i want to make an appointment for say every 5th day of June, November and December

From the documentation i could get that we can only specify one Month
ITA
Top achievements
Rank 1
 answered on 20 Apr 2012
4 answers
166 views
Hi,

I am facing a problem when I am trying to upgrade the telerik binaries from version "2009.3.1314.1030" to "2012.1.326.1050". I have added the reference of the assembly "Telerik.Windows.Controls.dll" in my project and after that the statement 
using Telerik.Windows.Controls ; 

is throwing an error like the below:
The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)

I have .net framework 4 installed on my machine.

One other interesting thing that I have observed is that when I have tried to open this assembly in the Object Browser from Visual Studio 2010, it is not opening the assembly.

Any suggestions/ideas to fix this issue?

Thanks,
Vijay
Jeff Lishingman
Top achievements
Rank 1
 answered on 20 Apr 2012
1 answer
132 views
I am trying to make the background color of the first row in my grid blue. here is what I am trying in c#.

 for (int i = 0; i < rgvAlarmLog.ColumnCount; i++)
                            {
                                rgvAlarmLog.Rows[rowCount].Cells[i].Value = HeaderRowSplit[i];
                                rgvAlarmLog.Rows[rowCount].Cells[i].Style.BackColor = System.Drawing.Color.Black;
                            }

I have another loop that goes through the rows and that is the rowcount variable. There is no visible color change when I do this. What am I doing wrong? It is a radgridview object. I have looked at similar post and tried their code to no avail. Any advice? Thanks
Vlad
Telerik team
 answered on 20 Apr 2012
2 answers
224 views
Hi,

I'm trying to implement a copy function.

In XAML I did the following:
<telerik:RadButton Command="telerik:RadDataFormCommands.AddNew" CommandTarget="{Binding ElementName=df}"
        ToolTip="Copy" CommandParameter="copy">
<telerik:RadButton.Content>
   <Image Source="Images/Copy.png"/>
</telerik:RadButton.Content>
</telerik:RadButton>


How can I get access to the CommandParameter "copy" in the code-behind so that I can determine that a copy is needed instead of a regular AddNew?

Thanks in advance
Bernard Grosperrin
Top achievements
Rank 1
 answered on 19 Apr 2012
2 answers
215 views
I can't seem to get the DataForm to sync with the GridView.

I've got both controls bound via ItemsSource to the same collection in my viewmodel. But when the form loads in debug, there doesn't appear to be any records. If I create a header for the DataForm that displays Items.Count, it correctly shows the number of Items in the collection. But the current item isn't working. When I click on a Navigation button or the new button, I get the following error:

System.Reflection.TargetParameterCountException occurred
  Message=Parameter count mismatch.
  Source=mscorlib
  StackTrace:
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.Windows.Data.ItemPropertyInfoExtensions.GetValue(ItemPropertyInfo itemProperty, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\ItemProperties\ItemPropertyInfoExtensions.cs:line 101

Call Stack:
 > Telerik.Windows.Data.dll!Telerik.Windows.Data.ItemPropertyInfoExtensions.GetValue(System.ComponentModel.ItemPropertyInfo itemProperty, object item) Line 101 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.PopulatePropertiesInitialValues(object currentItem) Line 886 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.OnCurrentItemChanged(System.Windows.DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args) Line 854 C#
  [External Code]
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.CurrentItem.set(object value) Line 829 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.OnItemsCurrentChanged(object sender, System.EventArgs e) Line 791 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.DataItemCollection.OnCurrentChanged(System.EventArgs e) Line 489 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.DataItemCollection.OnCollectionViewCurrentChanged(object sender, System.EventArgs args) Line 557 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.Listener<System.ComponentModel.ICollectionView,System.EventArgs>.ReceiveWeakEvent(object sender, System.EventArgs args) Line 43 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.WeakEvent.WeakListener<System.EventArgs>.Handler(object sender, System.EventArgs args) Line 33 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.OnCurrentChanged(System.EventArgs args) Line 141 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPositionCore(int position) Line 110 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPosition(int position) Line 97 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.MoveCurrentTo(object item) Line 46 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.AddNewInternal(object newItem) Line 462 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.AddNew(object newItem) Line 281 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.QueryableCollectionView.AddNew() Line 248 C#
  Telerik.Windows.Data.dll!Telerik.Windows.Data.DataItemCollection.AddNew() Line 82 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.AddNewItem() Line 1715 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadDataForm.OnAddNew(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Line 108 C#
  [External Code]
  Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadButton.OnClick() Line 388 C#
  [External Code]


Please help. I get the same error when I set the DataForm in the RowDetailsTemplate for the grid. in this situation it is triggered when I click on an item in the grid to select it and it tries to show the row details.
Jeff
Top achievements
Rank 1
 answered on 19 Apr 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?