Telerik Forums
UI for WPF Forum
6 answers
483 views
I'm trying to add a CellStyleSelector on autogenerated columns, but no style is being applied.  The grid is below.

<telerik:RadGridView Name="rgridProgramSearchResults" AutoGenerateColumns="True" AutoGeneratingColumn="rgridProgramSearchResults_AutoGeneratingColumn" CanUserFreezeColumns="False" IsReadOnly="True" Grid.Column="1"
                ItemsSource="{Binding}" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" Margin="0,0,0,30" SelectionMode="Multiple" >
    <telerik:RadGridView.Columns>
        <telerik:GridViewSelectColumn UniqueName="Select" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

and the style
<me:ImportStyle x:Key="stadiumCapacityStyle">
    <me:ImportStyle.BigStadiumStyle>
        <Style TargetType="telerik:GridViewCell">
            <Setter Property="Background" Value="Red"/>
        </Style>
    </me:ImportStyle.BigStadiumStyle>
    <me:ImportStyle.SmallStadiumStyle>
        <Style TargetType="telerik:GridViewCell">
            <Setter Property="Background" Value="Yellow" />
        </Style>
    </me:ImportStyle.SmallStadiumStyle>
</me:ImportStyle>

The auto generate event
private void rgridProgramSearchResults_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
{
     e.Column.CellStyleSelector = Application.Current.Resources["stadiumCapacityStyle"] as StyleSelector;
}


and the class

public class ImportStyle : StyleSelector
{
    public override Style SelectStyle(object item, DependencyObject container)
    {
        return BigStadiumStyle;
 
    }
    public Style BigStadiumStyle { get; set; }
    public Style SmallStadiumStyle { get; set; }
}
Boris
Telerik team
 answered on 30 Jan 2015
1 answer
388 views
Hi

we have a RadGridView in which we want to have a column which is bound to a Boolean property in view model, doing this we also want to use SelectAll functionality provided by GridViewSelectColumn

so when select all is performed, all the rows also have their bound object property set to true as well.

Is there any way by which we can bind a property to SelectColumn ?

Thanks
M.
Stefan
Telerik team
 answered on 30 Jan 2015
10 answers
599 views
Hi team,

Say class A has a property which is a collection of Class B. Now i want to design a UI attached. 

So I wonder if propertygrid has such a built support, if not, how am i gonna do this? A self defined a data template for the property?

Maya
Telerik team
 answered on 30 Jan 2015
3 answers
255 views
Hi,

Is it possible, on RadDatePicker control, to handle click event on week number ?

If so, how to get the clicked week number ?

Thanks
saw
Top achievements
Rank 1
 answered on 30 Jan 2015
1 answer
387 views
hi
how can i use image and text in same Cell?
like this
(Image)-MyName
(Image)-ID
????
Stefan
Telerik team
 answered on 29 Jan 2015
5 answers
382 views
Hi,

I would like to know if it's possible to change the cursor in the resize process when we try to resize an appointment over a slot that I don't want to permit. A cursor like we have when we block the drop operation.

Also, I would like to know if it's possible to resize of an readonly slot depending on a specific scenario?

Thank's
Alain
Scott
Top achievements
Rank 1
 answered on 29 Jan 2015
1 answer
320 views
Hi,

My application is in MVVM. I have a RadGridview where 2 columns are Databound and I have to generate third column dynamically with RowNumbers.
Here is my code. I am getting (collection) in the third column. The other 2 columns are fine. Please help me on this. 

XAML:

<telerik:RadGridView  Name="TestGridView"  ItemsSource="{Binding TestListView}" AutoGenerateColumns="False">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewColumn Header="RowCount">
                                <telerik:GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <TextBlock Text="{Binding TestRowNumber}"  />
                                        </StackPanel>
                                    </DataTemplate>
                                </telerik:GridViewColumn.CellTemplate>
                            </telerik:GridViewColumn>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" Header="NetBIOS Name" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Salary}" Header="Model" />
     </telerik:RadGridView.Columns>
                    </telerik:RadGridView>

ViewModel:

public void Testupdate()
        {
            RadObservableCollection<int> rno = new RadObservableCollection<int>();
            for (int i = 1; i <= TestList.Count; i++)
            {
                rno.Add(i);      
             }  
          TestRowNumber= rno;
         } 

  private RadObservableCollection<int> _testRowNumber;
        public RadObservableCollection<int> TestRowNumber
        {
            get { return _testRowNumber; }
            set
            {
                _testRowNumber = value;
             
                OnPropertyChanged();
            }
        }

Its showing correct count in the rno with items 1 to 6. But when displaying on the grid, its showing (collection). I am not able to trace where I am going wrong. Please correct me.

Thank you.










Boris
Telerik team
 answered on 29 Jan 2015
1 answer
85 views
Hi everybody, I am using RadGridView, and I want to do keyboard arrow key navigation like end to beginning and also beginning to end. I saw there is an "AllowActiveRowCycle" property in Telerik UI for ASP.NET but I can't find such a property in UI for WPF. Is there anything like this or another solution to provide this feature in WPF RadGridView ?
Boris
Telerik team
 answered on 29 Jan 2015
9 answers
683 views
How do I do this? Do I just add all of the telerik references individually? If so, is there a guide to make sure I add the right ones?

Also, with a wpf application I have to create the shared resource library with the themes. how do I do this with a user control library?

Thanks!
Eric
Petya
Telerik team
 answered on 29 Jan 2015
3 answers
546 views
Hi

We are new to telerik and still trying to evaluate RadDataGrid

Can you please provide me with an sample explaining how  can I override Header Row Selector to have a button inside it.

Thanks
M.
Stefan
Telerik team
 answered on 29 Jan 2015
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?