Telerik Forums
UI for WPF Forum
5 answers
91 views
What can be the problem when I´m trying to insert a new item and the insert focus is never in the first column?
Nedyalko Nikolov
Telerik team
 answered on 20 Jan 2010
1 answer
100 views
Hi to all,
i just would like to drag a RadTreeViewItem on a different component without make it selected.
Right now i have tried different ways without success...

I have implemented the PreviewMouseLeftButtonDown handler when the item is prepared, so when the user just press down the mouse i store the treeviewitem and put the e.Handled = true just to leave it unselected. When the event PreviewMouseLeftButtonUp is fired i will get the stored element and make it selected (so no drag operation...just a normal click on the element).

The big problem is that the
e.PreparedItem.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(PreparedItem_PreviewMouseLeftButtonDown);

is sent different times..the first time the source is the "root" element of the RadTreeView the second time the first child of the root element and so on. I think it is not correct to fire so many events if i mouse down only on one RadTreeViewItem...i aspect to have directly on the first event the right treeviewitem on the source!

Do you have any idea how to implement this scenario?

Really Thanks.
Diego Bonura




Miroslav
Telerik team
 answered on 20 Jan 2010
3 answers
124 views
I'm having issues with AlternatingRowStyle not being applied as expected when adding or removing items to the underlying ObservableCollection to which the grid is bound via the ItemsSource property.

The grid is sorted such that the newly added items are always at the top and the AlternationCount is set to 2.

When adding a second item, the rows display as expected, but when a third item is added, all rows display with the default style. Removing an item from the list does not cause the other rows to adjust based on their new position.

If I Commit an Edit to a cell in the grid, all rows in the grid will update their style and display as expected.

What could cause this kind of behaviour and how do I fix it?
Vlad
Telerik team
 answered on 20 Jan 2010
2 answers
123 views
I just got new direction orders from our CIO.  He wants to shift from ASP.net application to a smart client application.  I have read about the The Telerik CAB Enabling Kit.  Does Telerik have a whitepaper or example code that demonstrates best practices for OpenAccess, RIA Dataservices/ Web Services and WPF?   I am trying to decide on the approach to take with smart client.  I would like any suggestions as to the best way to implement such an application.

Thanks,
Bryan
Robert
Top achievements
Rank 1
 answered on 19 Jan 2010
3 answers
99 views
i want to use checkboxes instead of ctrl+click to select multiple rows in the radGridView. I use this.radGridView.SelectedItems in my functions but i don't know how to use the SelectedItems list with the checkboxes. I would greatly appreciate an example of use.. Sorry for my newbie question, and thank you for the help.
Pavel Pavlov
Telerik team
 answered on 19 Jan 2010
3 answers
325 views
Hello,
    There's probably an easier way to add a column to the grid dynamically but it gave me , a newbie, a lot of grief.

Adding a column dynamically to a grid that's associated with a datatable turned out to be relatively easy:

// Create the datatable column
newColumn = new DataColumn();
newColumn.ColumnName = <column name>;
newColumn.DataType = ..
....
<Datatable name>.Columns.Add(newColumn);
<Dataset name>.Tables[0].Columns[<column name>].SetOrdinal(<Position of the new column within the datatable>);

// Break and re-establish the link between the grid and the datatable.
<Grid name>.ItemsSource = null;
<Grid name>.ItemsSource = <Datatable name>;

// Load the new column with data by adding the data to the datatable
<datatable name>.Rows[<row index>][column index] = <data>;
<grid name>.Rebind;




Jorge Gonzalez
Top achievements
Rank 1
 answered on 19 Jan 2010
5 answers
161 views
Hello!
If I have a RadComboBox, with  more than 20 items this thing becomes a bit confusing.
My example:

Window1.xaml.cs:

public partial class Window1 : Window {
public Window1() {
            InitializeComponent();
            InitializeCombobox();
        }
        private void InitializeCombobox() {
            cbPrimaryData.Items.Clear();
            IList<String> dataItems = new List<string>();

            for (int i = 0; i < 50; i++) {
                dataItems.Add( "Item " + i );
            }
            cbPrimaryData.DataContext = dataItems;
        }
}

in Window1.xaml:

<Grid>
        <telerik:RadComboBox Grid.Row="1"
                             Grid.Column="1"
                             Grid.ColumnSpan="2"
                             Height="20"
                             Name="cbPrimaryData"
                             VerticalAlignment="Center"
                             ItemsSource="{Binding}"
                             Margin="2" />
    </Grid>

If I select the item at index 0 everything works fine when I try to open again the combo box the focus is at the beginning of the items list.
If item at index 1 is selected - at the nest attempt to open the combo box the focus goes to Item 17!
index 2 => focus at index 34
Afterwords the focus is moved at the end of the list.
I think that normal and logic would be that the combo box is focused starting with the selected index, and not at the end of the list.
I don't know if I was very clear in the explanation... just try the small example :)

Regards,
RoxanaC
Valeri Hristov
Telerik team
 answered on 19 Jan 2010
2 answers
102 views
Is there a way to disable the numerical tick label on the LinearScale control?
Sean
Top achievements
Rank 1
 answered on 19 Jan 2010
3 answers
91 views
Wondering if you have a date for releasing an updated internal build for the WPF controls? The combobox with the current release is really in need of some work with focus issues. Hoping all these are taken care of.

Also, any idea when using the combobox we will be able to set IsEditable = true AND limit their entires/selections to just what is in the list without having to write custom code? Setting IsReadOnly = true is not what we were looking for...

Thanks!
Valeri Hristov
Telerik team
 answered on 19 Jan 2010
2 answers
100 views
Hello,
     I set the background color of a grid column to red but it did not appear to work. When I scrolled down the cells began to appear read. When I scrolled back up to the top the cells that did not have a red background now had a red background.
Note. I have virtualizing turned on.

I switched off virtualizing  and the command to change the background of the column red did not work at all. Here's the command:

gridname.Columns[<column to turn red>].Background = Brushes.Red;

Any help would be appreciated.

Thanks
Pavel Pavlov
Telerik team
 answered on 19 Jan 2010
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?