Telerik Forums
UI for WPF Forum
1 answer
81 views

I would like to bring a row of my RadGridView into view programatically. I have a more than 100 rows. When I create a row(which I am doing by adding an item to a observable collection) I would like that new row to be selected and bring that into view. I was able to select the new row in my code but could not do the scrolling. More over I want the first cell of the row to be in edit mode so that the user can input text. I am following MVVM pattern for the application and would like to keep zero code in my views. How Can I achieve this?

Any help or suggestion will be appreciated....

Here is some of my code

XAML

<telerik:RadGridView ItemsSource="{Binding AllPartClasses}" 
                     
SelectedItem="{Binding SelectedPartClassViewModel, Mode=TwoWay}"        
                     
SelectionMode="Single" IsSynchronizedWithCurrentItem="True">

in my view model I did this

void AddNewPartClassExecute()
    {
        PartClass newPartClass = new PartClass();
        PartClassViewModel tempPartClass = new PartClassViewModel(newPartClass);
        tempPartClass.IsInValid = true;
        AllPartClasses.Add(tempPartClass);
        SelectedPartClassViewModel = tempPartClass;
        Global.DbContext.PartClasses.AddObject(newPartClass);

        //OnPropertyChanged("AllPartClasses");
    }
public PartClassViewModel SelectedPartClassViewModel
    {
        get
        {  
            return _selectedPartClassViewModel;
        }
        set
        {
            _selectedPartClassViewModel = value;
            OnPropertyChanged("SelectedPartClassViewModel");
        }
    }

Dimitrina
Telerik team
 answered on 16 Apr 2012
2 answers
99 views
I am using RadTreeListView, provided the Xaml below.
I wanted to do validation for the text box column, similar to what is provided for GridView column, 'CellValidating' event where if validation logic fails, text box shows a comment, and the border will become red. Is this supported in RadTreeListView, how can I implement in my code?

 <telerik:RadTreeListView x:Name="MyTree" AutoGenerateColumns="False">
 <telerik:RadTreeListView.Columns>
                    <telerik:GridViewDataColumn x:Name="ObjNameColumn" Header="Name" DataMemberBinding="{Binding Name}" >
                        <telerik:GridViewDataColumn.CellStyle>
                            <Style TargetType="telerik:GridViewCell">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate>
                                            <Border BorderBrush="LightGray" BorderThickness="0,0,1,0">
                                                <TextBox x:Name="txtBox_NewInstanceName"                                                   
                                                           HorizontalAlignment="Center" VerticalAlignment="Center"    
                                                            Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}">
                                                </TextBox>
                                            </Border>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.CellStyle>
                    </telerik:GridViewDataColumn>
...
...


Smita
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
108 views
I had a RadGridView that I allo add new and edit on the grid.  All my grids work perfect but one.  When ever I either click an existing row, or add a new row then move to another the grid no longer allows me to enter edit mode.  It saves ther changes successfully but then the gird is locked, I have to close the screen and reload it to make anotther edit.  I have 6 other screens and this work perfect, I can edit a row, add a row, and keep on going to the new row and edit it.
Dimitrina
Telerik team
 answered on 16 Apr 2012
1 answer
55 views
I have a DataPager which is set up in the following way:

<telerik:RadDataPager x:Name="radDataPager"
                          Source="{Binding Items, ElementName=TableSource}" PageSize="10"/>

The table is bound to a QueryableCollectionView which uses an IQueryable object to get its data. So far everything is working but when I use ShowInsertRow="True" and click on the "Click here to add new item" I don't see any reaction, but after clicking on that item the DataPager does not do anything when I try to change pages.

The problem seems to only exist when using IQueryable.
Rossen Hristov
Telerik team
 answered on 16 Apr 2012
0 answers
65 views
Hello,

I'm wonder if I can make the transition control (based on demo wpf transition control first look) display the page.axml automatically, in other words, the page.xaml must be changed every few seconds without clicked the previous and next buttons

Please, If it possible tell me how can I do that,
It is appreciated to send me the modified code based on the above demo.
Dung
Top achievements
Rank 1
 asked on 16 Apr 2012
0 answers
103 views
Hi
all the samples are shows how to inherit from system.windows.control.usercontrol but any one know a trick/method how to inherit from system.windows.forms.usercontrol??
the wpf page is locked and i get a messege "The document root element is not supported by the visual designer"
Ziv
Top achievements
Rank 1
 asked on 15 Apr 2012
1 answer
101 views
Hi,

i have two tables (Country and Customer). In the Table Country are three columns (id, Name, Text):

country_tab:
id   Name   Text
1   USA   U
2   Austria   A
3   Germany   D

customer_tab:
id    country  ....
1     1
2     1
3     3
...

I create a MV Customer which contains the country as integer. Now i want to display the selected customer. The Country should be shown in a Combobox. It is no Problem to display 1 from the customer_tab. But i want to display the Name from the country tab. How can i solve this?

Thanks a lot
Regrads
ww
ITA
Top achievements
Rank 1
 answered on 15 Apr 2012
1 answer
229 views
Hi,

1.png is an illustration of what i have achieved.
I want the X-axis to move to Y=0 everytime.
Basically i just want the MajorGridVisibile at Y=0 everytime. i.e. A prominent black line like the X Axis to clearly demarcate it from the rest of the MajorGridLines
Please check 2.png for illustration on the type of functionality required.

Thanks in advance.
Evgenia
Telerik team
 answered on 15 Apr 2012
12 answers
191 views
HI, I need simular functionality as this example -> http://www.telerik.com/community/forums/silverlight/gridview/show-aggregates-aligned-with-columns.aspx

To explain a bit better, I have 20 - 30 columns and need to aggregate some of them while I am grouping. As well I would like to change the aggregation number as well. I know that there is no "out of the box" way to do this but is there a way ?

Best regards
Kristján
Pavel Pavlov
Telerik team
 answered on 13 Apr 2012
1 answer
213 views
Is it possible to have "column headers" on a combo box bound to multiple items? For example a combo box that displays a Employee name. The combo box would display Aavadesh IT. But I'd like to display column headers:

Employee Name     Department
Aavadesh                 IT
Nilesh                       Purchase
Miral                         Marketing

So pleaes give me example.
Boyan
Telerik team
 answered on 13 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?