Telerik Forums
UI for WPF Forum
3 answers
167 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
182 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
121 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
366 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
202 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
142 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
119 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
142 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
1 answer
259 views
Hi,
i need that my last row in grid will be always selected and that the first cell in this row will be in edit mode.
BeginEdit() doesnt work for me becouse my ItemSource is not obserableCollection, its a custom collection:
 public interface ICustomObservableCollection<T> : ICollection<T>, INotifyCollectionChanged, INotifyPropertyChanged  
        where T : EntityBase2, IEntity2  
    { }  
 
    public class CustomObservableCollection<T> : ICustomObservableCollection<T> 
        where T : EntityBase2, IEntity2  
{} 


Thanx

Masha
Milan
Telerik team
 answered on 18 Jan 2010
11 answers
525 views
Hello

I want to search for a value in one of the columns in my grid and then select the row
I used this code to run on the items
foreach (GridViewRowItem griParent in RadGridView1.ChildrenOfType<GridViewRowItem>())  
                    {  
                        if (griParent.DataItem != null)  
                        {  
                            if ((griParent.DataItem as DataRowView).Row["ActivityName"].ToString().Contains(sSearch))  
                            {  
                                gvriParent.Add(griParent);   
                            }           
                        }  
                    }  
..........  
 
if (iParentSearch < gvriParent.Count)  
                {  
                    if ((gvriParent[iParentSearch] as GridViewExpandableRow) == null && ((gvriParent[iParentSearch].ParentOfType<GridViewExpandableRow>()))!=null)  
                    {  
                        ((gvriParent[iParentSearch].ParentOfType<GridViewExpandableRow>())).IsExpanded = true;  
                    }  
                    gvriParent[iParentSearch].IsSelected = true;  
                    this.RadGridView1.BringDataItemIntoView(gvriParent[iParentSearch]);  
                    iParentSearch++;  
                }  
...... 

the problem is
that if there is a scroll in my grid
the "foreach (GridViewRowItem griParent in RadGridView1.ChildrenOfType<GridViewRowItem>())   "
does not get the rows that are not shown in the screen

by the way
I use - this.RadGridView1.BringDataItemIntoView
but it looks like nothing happen

Thanks
Orit
Top achievements
Rank 1
 answered on 18 Jan 2010
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
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
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?