Telerik Forums
UI for WPF Forum
1 answer
124 views
Hello,

I'm working on a framework that is supposed to provide improvements to WPF controls. This framework also provides features for Telerik controls.

I would like to make a behavior that bring an item of a TreeView into view when it is (programmatically) selected.
The problem is, on the layer I'm working on, I have no idea of the path of the object to bring into the view (Because I don't know the associated view model). Basically I have the following method to implement in the behavior:

protected override void BringIntoView(object dataItem)
{
    // TODO: bring dataItem into the view of the AssociatedObject treeview
}


All I know is that dataItem is an item of the treeview. It can be collapsed and have no associated TreeViewItem yet. As far as I understand, under this situation I have to use the BringPathIntoView.

It is not a problem if I have to iterate through the whole graph of items, but I have to find the path of the item that was passed to this method. I can get the value of the TextSearch.TextPathProperty attached to the tree view, which can help me to construct the path of each item.

But how can I iterate through the children of a given item, since the children collection is defined by the HierarchicalDataTemplate used by the TreeViewItem that might be unrealized?

Thanks
Martin Ivanov
Telerik team
 answered on 02 May 2014
3 answers
355 views
Hi,
i am sending the email to ask for help about the RadRichTextBox. Therefore, my problem is that when we add the page number in document, this is written in white on the document.  How to write in black? 
I would like to know if you have some advice related to my problem.
Best regards,
Petya
Telerik team
 answered on 02 May 2014
3 answers
439 views

Hello

We need to update the source when property changed,

The source object update only when the cell edit ended.

Is there way to do this?

Best regards

Ehud

Dimitrina
Telerik team
 answered on 02 May 2014
2 answers
94 views
Is there a way to control the label connectors through binding or otherwise? It seems the datacontext for the connector is the same bound object as the chart and not the point. (RadCartesianChart) I'd like to selectively hide labels with a datatemplate but the connectors remain.

Petar Marchev
Telerik team
 answered on 02 May 2014
5 answers
509 views
We have two RadTreeViews on a form. Tree1 contains a list of items (single level) that can be added to different groups in Tree2. Assume the following default tree items:

Tree 1 (these items are static and cannot change. If you drag and drop, it copies the item instead of moving)
------------
Item 1
Item 2
Item 3
etc...

Tree 2
------------
Group A
Group B
Group C

Say I drag 'Item 1' to add it to both 'Group A' and 'Group B'. So Tree 2 now looks like:

Group A
- Item 1
Group B
- Item 1
Group C

If I click to select 'Item 1' in 'Group B' it selects 'Item 1' in 'Group A'. It seems like when making a selection, it searches the tree from the top-down for the item that was clicked on and selects the first occurrence. So if I ever try to drag 'Item 1' from 'Group B' and move it to 'Group C', it will actually move 'Item 1' from 'Group A' to 'Group C'.

I apologize if that seems confusing, not sure if I can explain it any better though. It's a really strange behavior and I'm sure it is not intended; however, I may be doing something wrong as well. I created 'HierarchicalDataTemplate' and 'DataTemplate' to set how the data displays my view model. I am also using the 'new' DragDropManager as well. The version of components we are using is 2013.3.1316.45 (we decided to not renew the license so this is the latest version available to us).

Is there something I could be doing wrong? Is there a work around I could use?

Thanks for any help
Brian
Top achievements
Rank 1
 answered on 01 May 2014
2 answers
1.0K+ views
As per title, when I click to add a new row in my RadGridView, I would like my RadDatePicker column to auto display today's date rather than 1/1/0001.
Is there any way to do this? I've tried to set various properties at design time such as DisplayDate, DateTextTime, SelectedDate but all doesn't make a difference.

I would perhaps try to do it at code-behind rather than design time, but I have no idea how to access it.
Anyways here are my codes currently:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SvcDate}" UniqueName="SvcDate"
                                            TextWrapping="Wrap" Width="100" TextAlignment="Center" DataFormatString="{}{0:ddMMyy}">
                    <telerik:GridViewDataColumn.Header>
                        <TextBlock Text="Service Date" TextAlignment="Center"/>
                    </telerik:GridViewDataColumn.Header>
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadDatePicker SelectedValue="{Binding Path=SvcDate}"
                                                   DateTimeWatermarkContent="Service"
                                                   ErrorTooltipContent="Unrecognised format. Use drop-down interface for input assistance."
                                                   Culture="en-SG" DisplayDateStart="01/01/2014">
                            </telerik:RadDatePicker>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

Dimitrina
Telerik team
 answered on 01 May 2014
12 answers
391 views
I have formatted a column in a gridview by using the dataformatstring attribute {0:P0}.
This changes my 0.32 values to 32 and displays percentages as I want it to, but when entering a value in the field filters, I need to enter the original value to get it to filter correctly. e.g 0.32 for 32

I'm hoping there is an easy way of intercepting the 32 value and changing it back to 0.32 for the purposes of filtering.

I've tried using the FieldFilterEditorCreated event on the grid and accessing the e.Editor (which seems to be a textbox with more properties), but I can't see anything in there that allows me to hijack the value and change it from 32 to 0.32.
I've also tried using the Filtering Event, and successfully transformed the 'Value' property of the filterdescriptors, but this change does not seem to be retained/passed through to the datasource

I'm aware that it could be that I need to create a new custom filtering control, but this seems very laborious, when all I want to do is retain the formatting of the column when filtering. 

I have three questions really, 
(1) Is there a way of transforming/intercepting the value passed to the datasource for filtering?
(2) Is creating a new custom filtering control the only way to do what I need to do
(3) If so, is there an example I can follow that focusses on the textbox filtering control, as opposed to the date filter as in this tutorial http://www.telerik.com/help/wpf/gridview-filtering-custom-filtering-controls.html

Many thanks
Alan
Dimitrina
Telerik team
 answered on 01 May 2014
5 answers
146 views
I'm using a RadDataForm with auto-generated fields and field edit controls. In case it's important, the RadDataForm is bound to a DataView. Due to the datatypes involved, most of the auto-generated edit controls are simply text boxes.  When I tab from one editable field to another, I'd expect the current contents to be "selected" so I could either 1) tab past an existing value or 2) quickly change it.

Currently however, the insert cursor is placed in the field - sometimes at the end of the existing data and sometimes at the beginning (I haven't determined what controls its location). So, if I just press <TAB> to advance to the next field and start typing some new data, it's *added* (either prepended or appended based on cursor position) to the existing data instead of overwriting it as I'd expect.

How can I force the current contents of each text box to be automatically selected when the control receives focus?

Jeff
Phillip
Top achievements
Rank 1
 answered on 30 Apr 2014
1 answer
153 views
I want a binding ICommand to the Click event of a button in ControlPanelitem. But it does not work. And I Binding SelectedValue of RadDatePicker control in ControlPanelItem and it also does not work. ControlPanelItem support from the model not binding?
luc
Top achievements
Rank 1
 answered on 30 Apr 2014
1 answer
172 views


 I have used the rich text box control to save the data in the lost focus event and the lost focus event is repeatedly getting fire while typing each characters in control.

   please let me know how to resolve this problem.Any help is appreciated.
Missing User
 answered on 30 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?