Telerik Forums
UI for WPF Forum
0 answers
136 views

When I click on a row in my TreeListView, I get a NullReferenceException error in my SelectionChanged method:

<telerik:RadTreeListView Name="equipmentTreeView" Margin="8" Background="Beige"
                     ItemsSource="{Binding FirstGeneration}"
                     telerik:StyleManager.Theme="Vista"  IsDragDropEnabled="True"
                     SelectionMode="Single"
                     SelectionUnit="FullRow"
                     SelectionChanged="equipmentTreeView_SelectionChanged"
                     IsSynchronizedWithCurrentItem="False"
                     AutoGenerateColumns="False" >
   
  <telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
  </telerik:RadTreeListView.ChildTableDefinitions>
  <telerik:RadTreeListView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding TagName}"
                                Header="{l:Translate ModuleEquipmentNavigator_ColumnHeaderTag}"
                                Width="Auto"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}"
                                Header="{l:Translate ModuleEquipmentNavigator_ColumnHeaderDesc}"
                                Width="Auto"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding ImportedEquipmentType}"
                                Header="{l:Translate ModuleEquipmentNavigator_ColumnHeaderIET}"
                                Width="Auto"/>       
  </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

 

public class AssetRowItem
{
    public string TagName { get; set; }
    public string Description { get; set; }
    public string ImportedEquipmentType { get; set; }
}



private void equipmentTreeView_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
    AssetRowItem aRI = this.equipmentTreeView.SelectedItem as AssetRowItem;
 
    string message = string.Format("Tag Name: {0} \n Description: {1} \n Imported Equipment Type: {2}",
                            aRI.TagName,
                            aRI.Description,
                            aRI.ImportedEquipmentType);
    MessageBox.Show(message);
 
}


 

 

 

 

 

Rob
Top achievements
Rank 1
 asked on 11 Oct 2012
0 answers
138 views
I have following window:

<telerik:RadWindow x:Class="IdealHost.FaceToFace.Controls.MessageBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" MinHeight="140" MinWidth="300"
                   WindowStartupLocation="CenterOwner" ResizeMode="NoResize"  >
 
<Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="80" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
 
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="1" Margin="15,10,15,10" Name="txtMessage" />
 
          </Grid>
</telerik:RadWindow>

When I'm assigning text using following code:

this.txtMessage.Text = message;

The window is propery resized to size of text.

But when I change TexBlock to use Binding:

<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" Margin="15,10,15,10" Text="{Binding Message}"/>

The window is not automatically resizing. And text is cut.

How can I fix this issue? I realy would like to use binding not direct code.
Marcin
Top achievements
Rank 1
Veteran
 asked on 11 Oct 2012
3 answers
171 views
Hi,

i'm using wpf and RadControls, I bound my Dataform to an ObservableCollection.
I like to add a new item to my Collection on "EditEnded".
private void VerbindungForm1_EditEnded(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndedEventArgs e)
{
    if (e.EditAction == Telerik.Windows.Controls.Data.DataForm.EditAction.Commit)
    {
       ??????????
    }
}

But how do i get the new Item ???
Thanks a lot
best Regards
Ww
Ivan Ivanov
Telerik team
 answered on 11 Oct 2012
1 answer
356 views
I used the Style prsented in the following post to get rid of the dotted border in the RadTreeView, and looked for a similar solution for the RadListBox, but couldn't find anything in the RasListBox Style.  Does anyone know of a way to remove the dotted border so I can have a consistent RadListBox and RadTreeView UI?

Remove black dotted border around RadTreeViewItem (or ...


Thanks in advance,
Steve
Masha
Telerik team
 answered on 11 Oct 2012
4 answers
76 views
Hi folks,

Wondering if anyone can point me in the right direction to modify the style of the RadWindow that the EditAppointmentTemplate is hosted in? 

-Sheldon
Spurk
Top achievements
Rank 1
 answered on 11 Oct 2012
3 answers
179 views
Hello,

I used RadGridView in radtabcontrol,
i can't click "add new row" in my application.
It has different bahavior, but I think its the same issue.
I maked now small test applikation, on first tab "add new row" click works only on second time click. On second tab its works only sometimes(after changing selected tab more then one time)
I uploaded my test application on: www.ysoft.de/addnewrow.zip
Priyalakshmi
Top achievements
Rank 1
 answered on 11 Oct 2012
1 answer
105 views
What's the use / purpose of the RadPane Scenario when creating a new RadPane? A new xaml definition page is generated with <telerik:RadPane> as the closing / ending tag, and the designer will show the Header value, but you create content all day long but the content will never appear in the designer. The only way content is display is to run the application. Why does the designer not show the content as the xaml is being entered in the editor?

 

 

 


Yana
Telerik team
 answered on 11 Oct 2012
0 answers
84 views
When I type in '10,00' in a gridcell, this becomes 1000. This can be confusing for European users. Is it possible to disallow comma's?
Erik
Top achievements
Rank 1
 asked on 10 Oct 2012
9 answers
149 views
Hi,

I have a WPF control which has RADGridView in it. I included that control inside a Windows Form using element host. But when I started dragging GridView row outside the element host it doesn't let me do that.

Another problem I wanted to drop a row from RagGridView to Desktop. How can I implement that. It would be nice if you respond promptly.

Thanks in Advance..

Sanket
Nick
Telerik team
 answered on 10 Oct 2012
2 answers
130 views
Hi folks,

is it possible to deactivate this bottom menu with minized views?
When we add a new Folder, we want to "height up" the folders and not opening it in this minimzed thing.

How does it work?

Best regards from Germany,

David Mueller
Pavel R. Pavlov
Telerik team
 answered on 10 Oct 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
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?