Telerik Forums
UI for WPF Forum
1 answer
99 views
Hello,
I started a new project and using your OpenAccess library just as you did in "WPF MVVM with OpenAccess" sample solution form OpenAccess SDK. AddCommand works fine when I add a single record. But when I try to add multiple records, ViewModel saves only recent inserted item. How do I savе multiple new records?
Thank you.
PetarP
Telerik team
 answered on 31 Jan 2012
2 answers
401 views
Hello,
I have a Category class which contains Categories property which is a List<Category>. I use MVVM with your OpenAccess ORM. Here is a XAML markup I use to bind tree to data:
<telerik:RadTreeView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="CategoryTree" ItemsSource="{Binding Path=Categories}" SelectedItem="{Binding Path=CurrentCategory, Mode=TwoWay}" SelectionChanged="CategoryTree_SelectionChanged">
                                <telerik:RadTreeView.ItemTemplate>
                                    <HierarchicalDataTemplate ItemsSource="{Binding Categories}">
                                        <TextBlock Text="{Binding Name}" />
                                    </HierarchicalDataTemplate>
                                </telerik:RadTreeView.ItemTemplate>
                            </telerik:RadTreeView>

In CategoryViewModel I have the following method:
protected override void Load()
        {
            _categories = new ObservableCollection<CategoryBO>();
            foreach (Category category in _repositoryCategory.Entities.Where(p => p.ParentCategory == null))
            {
                CategoryBO tempCategory = category;
                if (tempCategory != null)
                {
                    Categories.Add(tempCategory);
                }
            }
            _categoryView = CollectionViewSource.GetDefaultView(Categories);
            OnPropertyChanged("CategoriesList");
            OnPropertyChanged("CurrentCategory");
        } and this is how I initialize a CategoryBO object:
 public static implicit operator CategoryBO(Category category)
        {
            return new CategoryBO(category);
        }
public CategoryBO(Category category)
        {
            ID = category.CategoryID;
            ParentID = category.ParentID;
            Name = category.Name;
            foreach (ProductBO product in category.Products)
            {
                _products.Add(product);
            }

            foreach (Category cat in category.Categories)
            {
                _categories.Add(cat);
            }
        }
As you can see, I iterate through root level categories and they all have a Categories property filled with data. But when I try to select child categories from tree, they select visually on the tree but SelectedItem is always null. This happens because in Load() method I have CollectionViewSource.GetDefaultView(Categories) which returns a list which contains only root categories. 
How do get SelectedItem?
Thank you.
PetarP
Telerik team
 answered on 31 Jan 2012
2 answers
85 views
Hi --

I'm trying to add some SpellChecker capabilities to a RadGridView.  I'm currently auto-generating the columns in the GridView because it's not a fixed object type that will be displayed in the list. 

I am looking for a way to either:
  • Have the spell checker work when columns are auto-generated (just apply it to all columns)
  • Programmatically add columns to the gridview (MVVM pattern) by using reflection on an object.  With any luck, I would be able to use a custom DataAnnotation to indicate whether to use spell check on the generated column.  Also could maybe use a different annotation for the column heading?? 

Let me know your thoughts -- it would be really cool to get this to work.

Thanks in advance.
Erik
Top achievements
Rank 2
 answered on 31 Jan 2012
3 answers
175 views
Is it possible to use a DataTemplate for a GridView columns collection?
I want to define my columns once and use it in multiple views
Maya
Telerik team
 answered on 31 Jan 2012
5 answers
245 views
Hi,

in my application I have a RadGridView for who I create his columns dynamically on a specific event in my application. For each row in this grid, I need a sub grid. To achieve this, I create a GridViewToggleRowDetailsColumn dynamically.
 
In my XAML, I defined a <telerik:RadGridView.RowDetailsTemplate><DataTemplate><telerik:RadGridView x:Name="subSetGrid".

If I want to create dynamically the columns of my "subSetGrid" and assign it's "DataSource" to simething, how I can do to achieve this???

Thank's 
Rossen Hristov
Telerik team
 answered on 31 Jan 2012
2 answers
165 views
We have used Radgrid view and have fixed width of columns.ON double click of the row content we open a tab.
 When we stretch or increase the column width at runtime, it does show the complete bind text and after we double click the extended portion of the row, it does not get the event.
Following is the code example used

<telerik:GridViewDataColumn

                            ShowDistinctFilters="False"

                            Width="250"

                            >

                            <telerik:GridViewColumn.Header>

                                <TextBlock

                                    Text="Role Name"

                                    Style="{StaticResource HeaderTextBlockStyle}"

                                    >

                                </TextBlock>

                            </telerik:GridViewColumn.Header>

                            <telerik:GridViewColumn.CellTemplate>

                                <DataTemplate>

                                    <TextBlock

                                        Text="{Binding Path=RoleName}"

                                        TextTrimming="CharacterEllipsis"

                                        Width="250"

                                        >

                                        <TextBlock.ToolTip>

                                            <ToolTip

                                                Content="{Binding Path=RoleName}"

                                                Background="{StaticResource BlueBrush}"

                                                Style="{StaticResource ToolTipStyle}"

                                                >

                                            </ToolTip>

                                        </TextBlock.ToolTip>

                                    </TextBlock>

                                </DataTemplate>

                            </telerik:GridViewColumn.CellTemplate>

                        </telerik:GridViewDataColumn>

Bhakti
Top achievements
Rank 1
 answered on 31 Jan 2012
5 answers
132 views
using version 2011 Q1
I have a window with a tree view and a grid
when I change the selected item in the tree i run query, build an ObservableCollection and bind it to the ItemSource of the grid.
all grid columns are Width="Auto"
the problem is that when i rebind the ItemSource, the width of columns don't update correctly, actually they don't update at all.
sometimes a column in the the resulting collection has 200 characters at most, other times 25 characters at most.
the columns width does not re size to correctly to 25 characters, it is left at 200 characters, the columns have too much white-space.
is the grid not supposed to do update the columns when the ItemSource gets a new collection?
if not how can I force the columns to adjust to current data collection.
as in one of your examples i have tried to iterate the grid.Columns setting the width to Auto, nothing happened.

your help would be much appreciated.
thanks






Yordanka
Telerik team
 answered on 31 Jan 2012
3 answers
168 views
Hallo,
we have a performance problem with TileView on create tile view form.
As you can see in attached file, there is a big block with MeasureOverride cals inside Telerik TileView.. Is it possible do any optimalization inside this code?
Thank you. David.
Petar Mladenov
Telerik team
 answered on 31 Jan 2012
1 answer
130 views
Hello Telerik,
I've a ComboBox that shows the most recently selected date used (those data are taken by WCF service and they're stored on a DB), I wish the possibility to specify a new date using the DateTimePicker (I've tougth another combobox voice called "Other date" that shows up the DateTimePicker) ... is this possible? how should I handle this?

To be sincere I use an MVVM pattern (Caliburn Micro, ViewModel-first) but if I got the View-First solution I'll elaborate myself the modelview code

Thanks
Paolo
Konstantina
Telerik team
 answered on 31 Jan 2012
2 answers
216 views
Hi,
Could you please let me know how to create a separate context menu when user clicks on column header displaying all available columns of that grid view. using Data Table as data source for Grid view. Is there any feature , which needs to be set in order to enable the header context menu.


Also could you please let me know how to merge the footer cells and make the footer row of fixed width irrespective of number of columns and their width.

Thanks in Advance.

Regards,
Karthik.
Karthik
Top achievements
Rank 1
 answered on 31 Jan 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?