Telerik Forums
UI for WPF Forum
3 answers
122 views
Hi,

I have a RadTreeView with items and subitems:

All
    1
        1.1
        1.2
        1.3
    2
        2.1
        2.2
        2.3

Each subitem are associated to a RadTabControl/RadTabItem. When an item was checked in my treeview, I create dynamically a RadTabItem and when a user uncheck and item in my treeview, I remove it's associated RadTabItem from RadTabControl.

The problem is, when the user try to uncheck the item associated with the active RadTabItem in my RadTabControl, in my PreviewUnchecked event, I set the e.Handled property to true to prevent the remove of my RadTabItem in my Unchecked event.

Here is the piece of code:

 

private void radTreeViewDepartments_Unchecked(object sender, Telerik.Windows.RadRoutedEventArgs e)

 

{

 

RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;

 

 

//Remove a page if it's the lowest level item and if it's not the active tab.

 

 

if (item != null && !item.HasItems && item.Tag != null)

 

{

(item.Tag

as RadTabItem).Content = null;

 

RadTabControlDepartments.Items.Remove(item.Tag);

item.Tag =

null;

 

}

}

 

private void radTreeViewDepartments_PreviewUnchecked(object sender, RadRoutedEventArgs e)

 

{

 

RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;

 

 

//Check if it's not the active tab, if it's the active tab, the routedevent was stop.

 

 

if (item != null && !item.HasItems && item.Tag != null)

 

{

 

if (item.Tag == RadTabControlDepartments.Items[RadTabControlDepartments.SelectedIndex])

 

{

e.Handled =

true;

 

}

}

}


If the subitem "1.1" correspond the my active tab in my RadTabControl and the user unchecked the subitem "1" in my RadTreeView, both subitems "1.2" and "1.3" become unchecked and the subitem "1.1" stay checked but the subtiem "1" become unchecked to indicate me that all the subitems should be unchecked!!!

If I try to unchecked subitems "1.3", "1.2" and "1.1" manually, of course subitem "1.1" stay checked and the state of the subitem "1" stay correct!!!

Thank's
Petar Mladenov
Telerik team
 answered on 04 Oct 2011
5 answers
250 views
I've been looking at RadGridView for a couple of hours now and don't yet see where to start on this issue. Here's what I want to do...

I have a grid that I am using to display objects in a  BindingList. My view is watching the BindingList and creating grid rows as required. There are 7 objects in the list with 4 text fields on each. Right now, the values display as text in the grid with 7 rows x 4 columns. I need to add a special row to the top of the list that will be frozen, i.e., will not be scrolled when the user scrolls the records vertically. This row will have all comboboxes that will have a fixed number of items and will be presented as a drop list and not be editable. (As soon as I get this row in, I will have to add a second special row with all comboboxes but they will be edtiable.) The grid then should show 8 rows - my special row and the 7 rows for the items.

This all has to be done programmatically. Consider the concrete example: The program will read a delimited file and determine the number of columns that it has. It creates a new GridViewDataColumn for each. It will add the special row with each combobox having the options { int, double, string, DateTime }. And then it read the lines from the delimited file and displays them in the grid.

What I was hoping to see was a GridViewComoboxCell class so I could create a new GridViewRow and add GridViewComoboxCell(s) to the row.Items list. Alas, no such class. Also, I have set binding through the column definition as follows:

gridViewColumn.DataMemberBinding = new Binding(string.Format("[{0}]", i));

When I try to create the special row (that I cannot get to display), I get the following error when adding the row to the grid:

Indexer with specified arguments cannot be found on type GridViewRow
Parameter name: indexerArguments

This indicates that it is using the defined column binding on my new cells - and that won't work.

Suggestions on how to approach this problem would be very much appreciated.
Maya
Telerik team
 answered on 04 Oct 2011
3 answers
170 views
Hi,
I have posted my query http://www.telerik.com/community/forums/wpf/data-pager/adding-tool-tip-to-navigation-buttons.aspx.
On Sep 23, 2011. 
I am still waiting for any response.
Would Telerik team please care to respond to my query.

regards



Earthcaller
Top achievements
Rank 1
 answered on 04 Oct 2011
4 answers
231 views

Hi,

I have my grid defined as follows:

 

 

 

 

 

 

<telerik:RadGridView
            x:Name="RadGridView"
            AutoGenerateColumns="False"
            IsReadOnly="True"
            ItemsSource="{Binding VerificationPathsData}"
            SelectedItem="{Binding SelectedItem}" Loaded="RadGridView_Loaded" >
            <telerik:RadGridView.Columns>
  
                <telerik:GridViewDataColumn
                    Header="Verification Path Pair" 
                    UniqueName="VerificationPathPair"
                    DataMemberBinding="{Binding Path=., Converter={StaticResource VPPair}}"
                    />
                 <--Other COlumns follow--> 
                
I want the grid to be sorted based on this 'Verification Path Pair' column. I tried using columnsortdescrptor but that gave me error.
private void RadGridView_Loaded(object sender, System.Windows.RoutedEventArgs e)
       {
           Telerik.Windows.Controls.RadGridView rgv = (Telerik.Windows.Controls.RadGridView)sender;
           ColumnSortDescriptor csd = new ColumnSortDescriptor()
           {
               Column = rgv.Columns["VerificationPathPair"],
               SortDirection = ListSortDirection.Descending
           };
           rgv.SortDescriptors.Add(csd);
       }
Please suggest how can I have grid sorted based on this column.

Atanas
Telerik team
 answered on 04 Oct 2011
1 answer
325 views
Hello!

I'm creating menu using DataBing. For some reason RadMenuItem is wrapped with other menu item. Here is how my XAML looks like:

        <telerikNavigation:RadMenuItem ItemsSource="{Binding SupportedThemes}" >
........
          <telerikNavigation:RadMenuItem.ItemTemplate>
            <DataTemplate>
              <telerikNavigation:RadMenuItem
                Header="{Binding DisplayName}"
                Command="{Binding ChangeThemeCommand}"
                CommandParameter="{Binding}"
              />
            </DataTemplate>
          </telerikNavigation:RadMenuItem.ItemTemplate>

What needs to be done order to get menu item look like static menu items? Is something special need to be added to templated?

I would like to pay your attention that suggested solution need to work in WPF.
Dani
Telerik team
 answered on 04 Oct 2011
4 answers
186 views
Cut and paste from IE 9 doesn't appear to work to a richtextbox bound with the HtmlDataProvider.  I can cut & paste from the same web page using Firefox and it works fine.
2011.1.419.40
Iva Toteva
Telerik team
 answered on 04 Oct 2011
1 answer
223 views
Hi.
    I want to change mm/dd/yyyy to yyyy-mm-dd. Is it possible ?
please give me a xaml example.
thank you.
Ivo
Telerik team
 answered on 04 Oct 2011
1 answer
104 views
Hello,

If I cancel the selection of an item within the PreviewSelectionChanged event of the RadOutlookBar there are different behaviors depending on where the selection was made.

1) Selection in the 'normal' items-area -> Everthing is fine. The selected Item stays highlighted.
2) Selection in the MinimizedArea -> The wrong item gets highlighted.

Is it possible to workaround this ?

Regards
Rainer

Here is the sample-code:

<telerik:RadOutlookBar x:Name="obMenu"
               PreviewSelectionChanged="obMenu_PreviewSelectionChanged">
    <telerik:RadOutlookBarItem Header="Item 1">
        <Border Background="Blue">
            <TextBlock Text="Item1"/>
        </Border>
    </telerik:RadOutlookBarItem>
    <telerik:RadOutlookBarItem Header="Item 2">
        <Border Background="Green">
            <TextBlock Text="Item1"/>
        </Border>
    </telerik:RadOutlookBarItem>
    <telerik:RadOutlookBarItem Header="Item 3">
        <Border Background="Red">
            <TextBlock Text="Item1"/>
        </Border>
    </telerik:RadOutlookBarItem>
</telerik:RadOutlookBar>

private void obMenu_PreviewSelectionChanged(object sender, SelectionChangedEventArgs e) {
    if (MessageBoxResult.Yes == MessageBox.Show("Cancel selection ?", "Cancel", MessageBoxButton.YesNo, MessageBoxImage.Question)) {
        e.Handled = true;
    }
}

Petar Mladenov
Telerik team
 answered on 04 Oct 2011
1 answer
222 views
Hello all.

I have (double) from latitude and longitude.
Now i want show the real adress from this location in the map.
And i must wait for the answer before i can do anything else.

I´ve tried:

var reverseGeocodeRequest = new ReverseGeocodeRequest();
reverseGeocodeRequest.Location = new Location(tt.Latitude,tt.Longitude);
 
var geocodeService = new GeocodeServiceClient();
GeocodeResponse geocodeResponse = geocodeService.ReverseGeocode(reverseGeocodeRequest);
 
if (geocodeResponse.Results.Length > 0)
    results = geocodeResponse.Results[0].DisplayName;
 
}

I get an error
Fehler 3 Argument "1": Konvertierung von "Telerik.Windows.Controls.Map.ReverseGeocodeRequest" in "Telerik.Windows.Controls.Map.WPFBingGeocodeService.ReverseGeocodeRequest" nicht möglich. 
GeocodeResponse geocodeResponse = geocodeService.ReverseGeocode(reverseGeocodeRequest); 

And i don´t  know why...

Can anyone help please?

Reinhard




Andrey
Telerik team
 answered on 04 Oct 2011
1 answer
282 views
Hi,

I am using RadTimePicker in a WPF desktop application. But not able to find out how to format the display time to "HH:mm:ss".

Thanks

Ashish
Dani
Telerik team
 answered on 04 Oct 2011
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?