Telerik Forums
UI for WPF Forum
6 answers
437 views
I have a situation where I'm setting the RadPropertyGrid's Item to an ExpandoObject instance whose properties have been defined at run-time. I'm listening for the PropertyChanged event of the ExpandoObject to tell when a property has been updated.

I'm using the AutoGeneratingPropertyDefinition event to catch properties with specific names and assign an EditorDataTemplate that uses a RadNumericUpDown control. The problem is that the property value (let's just use the name "Prop1") is set by a nullable double, so sometimes Prop1 has a value, and sometimes its null. If Prop1 has a numeric value everything works great with the property editor, and I can change the field for Prop1 and it will change its corresponding value in the ExpandoObject perfectly.

However if Prop1 is set to null, its field shows up in the PropertyGrid but when I change the value I don't get any PropertyChanged event from the ExpandoObject. The event fires if I set a value to Prop1 in code-behind, but not if I try to change it from the PropertyGrid. This leads me to believe there is some sort of binding issue with the property grid and ExpandoObject properties with null values.

Any suggestions?
Chris
Top achievements
Rank 1
 answered on 11 Nov 2015
6 answers
243 views

Hi,

I use RadGridView in my project...

when i change the value at some row (only happen at textbox, when i change value at checkbox/combobox it doesn't happen) and then try to sort the column ascending or descending it crashes.

It only happens when i set AutoGenerateColumns to false (which is always the case in our application..)

To enable sorting, I set DataMemberBinding of each column.

The error I get is:

"The runtime has encountered a fatal error. The address of the error was at 0x5b7d157d, on thread 0x430. The error code is 0x80131623. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code."

The code I use:

<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding MyArray}">
        <telerik:RadGridView.Columns>
           <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <AdornerDecorator>
                            <TextBox Text="{Binding Name}" />
                        </AdornerDecorator>
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>
            </telerik:GridViewDataColumn>
         </telerik:RadGridView.Columns>
</telerik:RadGridView>
   

 

 

 

Dilyan Traykov
Telerik team
 answered on 11 Nov 2015
0 answers
162 views

Hello,

i am trying to use DataPager to display the count of rows in GridView, which are filtered or grouped in the GridView.

Then i have the Binding of Items with GridView.

<telerik:RadDataPager
            Grid.Row="1"
            PageSize="25"
            Source="{Binding Items, FallbackValue={x:Null}, ElementName=GridView}"/>

My problem is that, if i use Groupe function of GridView, i will see the number of groups insteads of the number of shown rows of GridView in DataPager.

Has somebody solved this problem? Thanks a lot!

Ivan

 

Ivan
Top achievements
Rank 1
 asked on 11 Nov 2015
4 answers
189 views
Is it possible to insert a "today" button in the schedule header, or to configure the date picker to show this option?
Claire
Top achievements
Rank 1
 answered on 11 Nov 2015
1 answer
206 views

We need to be able to enable or disable a DataPager associated with a GridView when the window loads (some users want it and other don't). I have tried setting the visibility to collapsed, setting IsEnabled to false and setting Source to null in the window constructor. None of these work. The pager isn't visible but the grid only shows the first page of data. The grid's ItemsSource is bound to an ObservableCollection and is populated in the Window_Loaded event. Here is the relevant xaml:

</telerik:RadGridView>
                       <telerik:RadDataPager x:Name="DpEvents" Grid.Row="2" Source="{Binding Items, ElementName=grdEvent}" PageSize="18"
                                             DisplayMode="All" AutoEllipsisMode="Both" NumericButtonCount="10" IsTotalItemCountFixed="True" />

Stefan
Telerik team
 answered on 11 Nov 2015
1 answer
161 views

Hi,

I'm migrating from RadMaskedTextBox to the new mask controls and encountered the following problem with MaskedDateTimeInput.

Up until now I used to set the "Text" property of the control, because my data structure holds the value as string with the correct format.

When I try setting the "Text" property of MaskedDateTimeInput via code to a certain date string, it doesn't affect the "Value" property.

When I click on the control it changes the text back to the current date.

 

I know I can use the value property but that requires me to convert my text value into DateTime and I don't want to do that if it can be done automatically via the control. 

Please advice

Peshito
Telerik team
 answered on 11 Nov 2015
1 answer
185 views

hello i'm trying to edit database from RadGridView, i'm using Scimore database and is connected to my GridView. I bind the itemsSource But if i change the data from Gridview, the database is not updated. why? how can i do that?

Here's my code :

XAML

<Grid>
        <StackPanel x:Name="LayoutRoot">
            <telerik:RadGridView x:Name="dataGrid1"
                                 AutoGenerateColumns="True"
                                 ColumnWidth="*"
                                 ShowGroupPanel ="False"
                                 CanUserReorderColumns ="False"
                                 ItemsSource="{Binding datatable.DefaultView}">
            </telerik:RadGridView>
        </StackPanel>
    </Grid>

CS

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            string dbInstanceName = "C:\\Users\\Admin\\Documents\\Visual Studio 2010\\Projects\\DisplayDB\\DisplayDB\\configdb";
            ScimoreEmbedded em = new ScimoreEmbedded();
            em.Open(dbInstanceName);
 
            try
            {
                using (ScimoreConnection cn = em.CreateConnection())
                {
                    cn.Open();
 
                    string Query = "select idx,tag,value from config.info";
                    ScimoreCommand createCommand = new ScimoreCommand(Query, cn);
                    createCommand.ExecuteNonQuery();
 
                    ScimoreDataAdapter dataAdp = new ScimoreDataAdapter(createCommand);
                    DataTable dataTable = new DataTable("info");
                    dataAdp.Fill(dataTable);
                    dataGrid1.ItemsSource = dataTable.DefaultView;
                    dataAdp.Update(dataTable);
                }
            }
            catch (Exception)
            {
            }
        }
    }

Maya
Telerik team
 answered on 11 Nov 2015
4 answers
141 views

Hi I am new to Telerik, so Im sorry if this is a stupid question.

 I need to translate some text to Swedish. Basicly everything in the new appointment window I need to translate. 

 I also want to completely remove the alldayevent and the edit recurrence features. 

 

Kalin
Telerik team
 answered on 11 Nov 2015
8 answers
1.1K+ views

Hello,

in the new features of the Q3 2015 version, it is that we can use IconSources to change the icons used for a RadRichTextBox UI.

Unfortunately, the documentation is very poor: http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/how-to/switching-icons-at-runtime
1. Where do I need to put this XAML code?
2. Where do I specify the set of icons to use?

And most important:
3. How can I define my own icons for RadRichTextBox?

Thanks in advance

Tanya
Telerik team
 answered on 10 Nov 2015
2 answers
170 views

Hi,

I have a DataForm with AutoGenerateFields="True". In the AutoGeneratingField event handler I want to set a binding on the IsReadOnly property for some of the fields, so that when the FromProfile property is checked, those fields will be set as ReadOnly. The strange thing is that the binding only works if FromProfile is True when the AutoGeneratingField is fired. The DataField's ("Port", "Protocol" and "Interface") is set ReadOnly whenever the "FromProfile" DataField is checked. If FromProfile is False at the time the binding is set up, it doesn't work.

The AutoGeneratingField event handler looks like this:

01.if (e.DataField.Label.Equals("Port") || e.DataField.Label.Equals("Protocol") || e.DataField.Label.Equals("Interface"))
02.{
03.    var binding = new Binding("FromProfile")
04.    {
05.        Mode = BindingMode.OneWay,
06.        UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
07.    };
08.    e.DataField.SetBinding(DataFormDataField.IsReadOnlyProperty, binding);
09.}
 

Any idea why it doesn't work?

 

Regards,

Roar
Top achievements
Rank 1
 answered on 10 Nov 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?