Telerik Forums
UI for WPF Forum
3 answers
111 views
I have a hierarchy of items and when I double click one item I asynchronously open the document represented by that item in a working area. During the (potentially) long open action I disable that item so the user can't double click it again, or rename it or delete it etc.

However I've seen that its children also get disabled by this and I don't want this.

Can I just disable one item without having its children disabled?
Petar Mladenov
Telerik team
 answered on 14 Jul 2011
1 answer
152 views
Using WPF4's TextOptions.TextFormattingMode="Display" to improve overall text clarity seems introduce rendering artifacts with the RadRichTextBox as shown in the screenshot. Since in my opinion TextOptions.TextFormattingMode="Display" greatly improves the overall impression of a WPF app it would be nice if the RadRichTextBox would handle this correctly.

http://www.flickr.com/photos/47457340@N06/5914179061/

Boby
Telerik team
 answered on 14 Jul 2011
0 answers
132 views
Hi Team,

We are using telerik rad gridview (Version 2011.1.0419)  in application. It is working very fine. The problem that we are facing is, the columns of gridview are getting collapsed(to very narrow) for few seconds while loading data into it, later the columns widths are adjusting automatically.

Requirement is When the scrollable grid is first displayed, the columns should be displayed in their final form without the collapsing and expanding of columns.

Please let us know what is the resolution for this. I am placing xaml code that we have used.

Also, Please let us know how to display the grid only after loading as a quick solution

<telerik:RadGridView Name="searchResultsGridView" ColumnWidth="*" CanUserDeleteRows="False" IsReadOnly="True" IsFilteringAllowed="False" CanUserSortColumns="True" CanUserInsertRows="False" VerticalAlignment="Top" RowLoaded="OnSearchResultsGridLoaded" SelectionChanged="OnSearchResultsSelectionChanged" RowUnloaded="OnSearchResultsGridUnLoaded"   Height="Auto" Width="Auto" Margin="5,3,5,0" Style="{StaticResource GridViewStyle}" HeaderRowStyle="{StaticResource HeaderStyle}" ItemsSource="{Binding}">
                                <telerik:RadGridView.Columns >
                                    <telerik:GridViewDataColumn Name="createDateCol" Width="Auto"  Header="Last Updated" DataMemberBinding="{Binding CreatedDate}" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDynamicHyperlinkColumn Name="lastNameCol" Width="Auto"  Header="Last Name" DataMemberBinding="{Binding LastName}"  HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDynamicHyperlinkColumn Name="firstNameCol" Width="Auto" Header="First Name" DataMemberBinding="{Binding FirstName}" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="dateOfBrthCol" Header="Age"  DataMemberBinding="{Binding DOB}" Width="Auto" HeaderTextAlignment="Center" TextAlignment="Center" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="genderCol"    Header="G" DataMemberBinding="{Binding Gender}" Width="Auto" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="stateCol"     Header="ST" DataMemberBinding="{Binding StateCode}" Width="Auto" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="quoteIdCol"    Header="Quote/Illustration" Width="Auto" HeaderTextAlignment="Left" TextAlignment="Left" DataMemberBinding="{Binding QuoteId}"  HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDynamicHyperlinkColumn Name="prodDescCol"  UniqueName="prodDescCol"   Header="Product Summary" DataMemberBinding="{Binding ProductDesc}" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="annPremCol"   Header="Annual Premium" DataMemberBinding="{Binding AnnualPremium}" HeaderTextAlignment="Right" TextAlignment="Right" Width="Auto" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="agntCdCol"    Header="Agent Code" DataMemberBinding="{Binding AgentCode}" HeaderTextAlignment="Right" TextAlignment="Right" Width="Auto" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="agntNameCol" Width="Auto" Header="Agent Name" DataMemberBinding="{Binding AgentName}" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                    <telerik:GridViewDataColumn Name="gaCodeCol"    Header="GA Code" DataMemberBinding="{Binding GACode}" Width="Auto" HeaderTextAlignment="Right" TextAlignment="Right" HeaderCellStyle="{StaticResource ColumnHeaderStyle}" CellStyle="{StaticResource gridcellStyle}"/>
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>


Regards
Ramesh
Ramesh
Top achievements
Rank 1
 asked on 14 Jul 2011
1 answer
79 views
Hi,

I need to bind the tileviewItems count dynamically from xaml.
I mean same times i need to show only one item and some time up to 10 items.

Can you Please help me.....
i was gone through the wpf examples but i can't get  
SimpleItem.Generate(50);

what is    simpleItem there.
and also .generte property also.

Help me plzzzzzzzzz




thanks in advance...
Zarko
Telerik team
 answered on 13 Jul 2011
2 answers
98 views

Our testing team reported that on occasion column reordering by drag-and-drop resulted in other columns moving.  Since we do not implement any custom reordering or drag-and-drop functionality in the grid, I could not figure out why this was happening.  Therefore, I added event handlers for ColumnReordering and ColumnReordered.  What I discovered was that sometimes the events were being called multiple times for a single drag-drop operation on a column.  This was happening in a somewhat random pattern.  I could drag a column to a new position, and it would work ok with the events only called once, then I would drag another column, and three columns would move to new positions, with the event called for each move. 

Right now, we are using version 2011.1.419.40.  Are there any known issues with column reordering that were fixed?

Thanks for your help.
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 13 Jul 2011
1 answer
126 views
Hello,
  I am trying to implement a filter to treeview items based on a textbox value used as a search string.  I figured I could evalute the FullPath property of a treeviewitem to insure all parent/children were included however the FullPath property seems to be coming across as Empty for me.  Is there something I am missing?  Here is my code:

 

Private Function NameFilter(ByVal item As RadTreeViewItem) As Boolean

    If item.HasItems Then item.Items.Filter = New Predicate(Of Object)(AddressOf NameFilter)

    Return item.FullPath.Contains(txtSearchList.Text)

End Function


Petar Mladenov
Telerik team
 answered on 13 Jul 2011
1 answer
122 views
On a RadGridView with grouping, if you select the last row and hit the keydown a few times, the application appears to "freeze" up for 1-2 minutes.  It eventually comes back to life, but appears to be frozen.  Only seems to happen if you try to keydown past the last row in the grid.  Any help would be appreciated.  I should add that this behavior appears on a 64-bit Windows 7 OS. Another developer with 32-bit WIndows 7 does NOT have this issue.  Thanks!

XAML:
<tel:RadGridView x:Name="ListsGV" Grid.Row="2" ItemsSource="{Binding EditFormViewModelCollection}"
        IsReadOnly="True" SelectedItem="{Binding CurrentEditFormViewModel}"
        PreviewMouseDoubleClick="gridView_PreviewMouseDoubleClick"
        HeaderRowStyle="{StaticResource HeaderStyle}"
        CanUserSortColumns="False">
 
  <prism:CommandBehaviorCollection.Behaviors>
    <prism:BehaviorBinding Event="MouseDoubleClick" Command="{Binding TableSelectedDoubleClickCommand}" CommandParameter="{Binding ElementName=ListsGV, Path=CurrentItem}" />
  </prism:CommandBehaviorCollection.Behaviors>
 
  <tel:RadGridView.GroupDescriptors>
    <tel:GroupDescriptor Member="CurrentList.SystemModule" />
  </tel:RadGridView.GroupDescriptors>
  <tel:RadGridView.GroupHeaderTemplate>
    <DataTemplate>
      <TextBlock Text="{Binding Header.Description}" Margin="1,0,0,0" />
    </DataTemplate>
  </tel:RadGridView.GroupHeaderTemplate>
 
  <tel:RadGridView.Columns>
    <tel:GridViewDataColumn Header="Description" DataMemberBinding="{Binding CurrentList.Description}"
        HeaderCellStyle="{StaticResource HeaderCell}" MinWidth="300" />
    <tel:GridViewDataColumn Header="Shared Operations" DataMemberBinding="{Binding CurrentList.SharedOperation}"
        HeaderCellStyle="{StaticResource HeaderCell}" Width="*"/>
  </tel:RadGridView.Columns>
</tel:RadGridView>

Tom
Yordanka
Telerik team
 answered on 13 Jul 2011
2 answers
135 views

I'm having an issue with column header wrapping due to my headers being bound to the DisplayName attribute of my properties.

I have a Property in my view model, using the DisplayName attribute:

[DisplayName("Component Item Identifier")]
public String ComponentItem
{
    get { return componentItem; }
    set
    { ... }
}

I can make that display in the header using:
<telerikGrid:GridViewDataColumn  UniqueName="ComponentItem" 
             DataMemberBinding="{Binding Path=ComponentItem}" 
             Header="{Binding Path=ComponentItem.DisplayName}" >
</telerikGrid:GridViewDataColumn>

However, I need to make the header column wrap the text.  The method I've found in these forums is via using a TextBlock as the header UI element, and I can make that work without the bindings:
<telerikGrid:GridViewDataColumn  UniqueName="ComponentItem"
DataMemberBinding="{Binding Path=ComponentItem}">
    <telerikGrid:GridViewDataColumn.Header>
        <Grid>
            <TextBlock Text="MY LONG TEXT FOR TESTING WRAPPING" TextWrapping="Wrap"/>
        </Grid>
     </telerikGrid:GridViewDataColumn.Header>                            
</telerikGrid:GridViewDataColumn>

But, the problem comes when I try to bind that TextBlock to my DisplayName, as follows, the header ends up blank:
<telerikGrid:GridViewDataColumn  UniqueName="ComponentItem"
DataMemberBinding="{Binding Path=ComponentItem}"
    <telerikGrid:GridViewDataColumn.Header
        <Grid
            <TextBlock Text="{Binding Path=ComponentItem.DisplayName}" TextWrapping="Wrap"/> 
        </Grid
     </telerikGrid:GridViewDataColumn.Header>                             
</telerikGrid:GridViewDataColumn>

Am I binding incorrectly in this code?  Or is this just not supported in this structure?

Sincerely,
Russell.






Russ
Top achievements
Rank 1
 answered on 13 Jul 2011
1 answer
71 views
Hello,
I am trying to use the QueriableCollectionView class for DataGrid databinding.
I have the folowing code on window loaded event:

private QueryableCollectionView _qcv; 
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            _qcv =  new QueryableCollectionView(_entities.Countries);
            radGridView1.ItemsSource = _qcv;
            radDataForm1.ItemsSource = _qcv;
        }

then:

  private void ButtonDeleteClick(object sender, RoutedEventArgs e)
        {
            Country c = _qcv.CurrentItem as Country;
            _qcv.Remove(c);
        }

Can you tell me please why _qcv.Count remains the same? The item is not deleted? What am I doing wrong?Am i missing something?
Thank you very much.

PS: QueriableCollectionView.CanRemove returns false.
Rossen Hristov
Telerik team
 answered on 13 Jul 2011
6 answers
308 views
Hello Telerik team,

I am using your radGirdView for viewing some of my records in my database.
When I add a record in my database, the gridview does not refresh.

I am new to WPF and it is just a simple basic program.

Thanks in advance!
Maarten
public void refreshList()
        {
            MySqlConnection conn = new MySqlConnection(connString);
            personList.Clear();
            using (conn)
            {
                String sql = "SELECT * FROM personeel ORDER BY Naam;";
                MySqlCommand cmd = new MySqlCommand(sql, conn);
                conn.Open();
                MySqlDataReader reader = cmd.ExecuteReader();
                StringBuilder htmlStr = new StringBuilder("");
 
                while (reader.Read())
                {
                    String Naam = htmlStr.Append(reader["Naam"]).ToString();
                    htmlStr.Clear();
                    String Voornaam = htmlStr.Append(reader["Voornaam"]).ToString();
                    htmlStr.Clear();
                    String Gsm = htmlStr.Append("0" + reader["GSM"]).ToString();
                    htmlStr.Clear();
 
                    personList.Add(new Person(Voornaam, Naam, Gsm));
                }
                conn.Close();
            }
            //gridView1 = new Telerik.Windows.Controls.RadGridView();
             
            gridView1.ItemsSource = personList;
             
            //CollectionViewSource.GetDefaultView(gridView1.ItemsSource).Refresh();
             
        }
Maarten
Top achievements
Rank 1
 answered on 13 Jul 2011
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?