Telerik Forums
UI for WPF Forum
4 answers
756 views
I have implemented a "Property Editor" style control for our application that utilizes a RadGridView.  By utilizing standard and custom .NET attributes, we allow for custom editing of properties from any user-configurable object within our product.  The user is also able to display properties alphabetically or by category.  I implement editing by creating a custom column type that inherits from GridViewDataColumn and overrides the CreateCellEditElement method.

The RadGridView has really served us nicely in this respect.  Recently, a request was made to support "Password" class properties.  Implementing the editor was trivial using the PasswordBox control.  However, I'm running into issues when trying to mask the password's value when not in edit mode.

Currently, I have defined a style that sets the Foreground font color to "Transparent" if the editor type is "Password":

<Style TargetType="telerik1:GridViewCell"
       x:Key="ValueCellStyle">
    <Style.Triggers>
        <DataTrigger Binding="{Binding Path=Editor}"
                     Value="Password">
            <Setter Property="Foreground"
                    Value="Transparent" />
        </DataTrigger>
    </Style.Triggers>
</Style>

This style is then utilized by the custom column class (inherited from GridViewDataColumn):

<my
:ConfigDataColumn Header="Value"
                      DataMemberBinding="{Binding Value, Mode=TwoWay}"
                      Width="300"
                      IsReadOnly="False"
                      CellStyle="{StaticResource ValueCellStyle}" />

This works well, but it's not was I would like to do.  By setting the foreground font color, it gives the impression to the user that their entry was not accepted by the program.  I would really like to mask the password with a character in the cell similar to what the PasswordBox control does.  When I attempt to set the ContentTemplate with a control (TextBlock or PasswordBox), I loose the ability to edit the cell's contents.  The row will go into edit mode, but the edit control is not displayed even though the CreateCellEditElement method is being executed.

What's the best way to implement such a method of data masking?

...Glenn
Glenn
Top achievements
Rank 2
 answered on 05 Oct 2011
1 answer
87 views
Hello everyone,

There has to be a way to do this.
Problems

1. What I am trying to do it bind a list<Objects> to a series to have multiple series on the chart show. But there will be an unknown amount of Series each time so I can't hard code everything series mapping. Is there a way to have one series mapping definition set and bind a collections of objects to it?

2. After I have the series mapping done I am looking to do some simple filtering through the chart legend. Would there be a way to do this with the none hard-coded series mappings?

Please help

Thank you 
Evgenia
Telerik team
 answered on 05 Oct 2011
0 answers
55 views
Hello Telerik,

Is it possible to do a drag and drop operation on a GridViewGroupRow ? I am trying but some how drag does not start.
             Do you have any sample for that ? I am doing a college project and need it a bit urgently to demonstrate in my class
Karan
Top achievements
Rank 1
 asked on 05 Oct 2011
0 answers
139 views
I have Telerik RadTreeListView

<

telerik:RadTreeListView x:Name="treeListView" AutoGenerateColumns="False">

 

<telerik:RadTreeListView.ChildTableDefinitions>

 

<telerik:TreeListViewTableDefinition ItemsSource="{Binding SubFolders}" />

 

</telerik:RadTreeListView.ChildTableDefinitions>

 

<telerik:RadTreeListView.Columns>
<telerik:GridViewDataColumn Header="Folder/File Name" Width="408" IsReadOnly="True" IsSortable="True" IsFilterable="False" HeaderTextAlignment = "Center" TextAlignment="Left">

 

<telerik:GridViewDataColumn.CellTemplate>

 

<DataTemplate>

 

<StackPanel Orientation="Horizontal">

 

<Image Source="{Binding FileorFolderPath}"/>

 

<TextBlock Text="{Binding FolderName}" Margin="5" MouseUp="editcell_MouseLeftButtonUp"/>

 

</StackPanel>

 

</DataTemplate>

 

</telerik:GridViewDataColumn.CellTemplate>

 

</telerik:GridViewDataColumn><telerik:GridViewDataColumn DataMemberBinding="{Binding Date, StringFormat=\{0:dd-MMM-yyyy\}}" Header="Date" IsReadOnly="True" Width="140" HeaderTextAlignment = "Center" IsSortable="True" IsFilterable="False" TextAlignment="Center" />

 

<

telerik:GridViewDataColumn DataMemberBinding="{Binding Count}" Header="Version" IsReadOnly="True" Width="70" HeaderTextAlignment = "Center" IsSortable="False" IsFilterable="False" TextAlignment="Center" />
</telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
For alternate Rows i like to Apply different Baground Color How Can i Do ?
Help me out as soon as possible....

 

Ravi
Top achievements
Rank 1
 asked on 05 Oct 2011
1 answer
200 views
I am using hierachial example , but I populate the data in viewmodel only after the treeview has been load.

sequnce of events _treeview loaded , then getdata from database and assisgn the value to the property.

if I want to GetItemByPath what event should I listen to before I start using the method.  

Petar Mladenov
Telerik team
 answered on 05 Oct 2011
0 answers
134 views

Hi..

I am using Telerik Rad Wpf grid.

I want to disable some records by binding with linq entities.

Suppose I have an entity named Title which has an active field. I have below converter which is mentioned in Resources.

 

<

 

 

my:UserControl.Resources>

 

 

 

 

 

 

 

 

<my1:BooleanConverter x:Key="RowEnableConverter"/>

 

 

 

 

 

 

 

 

</my:UserControl.Resources>

 

 

 

 

And in Grid control , there is a datacolumn.

 

<

 

 

telerik:GridViewDataColumn Header="Document Name" DataMemberBinding="{Binding DOCUMENTDSC, UpdateSourceTrigger=PropertyChanged}" Width="1.5*" IsFilterable="False" IsEnabled="{Binding ACTIVE,Converter={StaticResource RowEnableConverter}, UpdateSourceTrigger=PropertyChanged}" />

 

 

 

 

Now please see the below example:

1           Ahmed        25

2           Ali               35

3          Maifs           25

Now  i  want to disable/readonly 2nd record which is

2           Ali               35.

How would i ?
Suggest please.

mehmood ahmed
Top achievements
Rank 1
 asked on 05 Oct 2011
0 answers
82 views
Hi Support

Move First Command when the focus is in last column donot work, is it bug? Can I fix it?

Thanks in advance
Mehri
Mehri
Top achievements
Rank 1
 asked on 05 Oct 2011
2 answers
336 views
Hi,

I have a radgridview that is bound to an observablecollection containing 16 properties, one for each column of the radgridview.  I have an WCF service that I poll every second, updating the observablecollection and thus, updating the radgridview.  I'm doing this with a dispatchertimer that fires a backgroundworker.  This works quite smoothly, although larger result sets (more than 50 rows) cause the GUI to freeze and/or the radgridview to "blink" momentarily.  Those, I'm assuming are limitations of WPF's threading abilities.  Anyhow, the largest problem I have is that on radgridview's that scroll vertically, when a user scrolls down, the grid scrolls all the way back to the top whenever the collection changes.  

I'm using Row and Column virtualization, if that makes any difference.  

Is there a way to make the grid not scroll to the top when the collection changes??
Kurt
Top achievements
Rank 1
 answered on 05 Oct 2011
3 answers
84 views
Hi

I want expand some row at run time in gridview and treeview. Please help me.

Thanks 
Vijay Kumar
Vera
Telerik team
 answered on 05 Oct 2011
0 answers
68 views
Hi,

I have a self referencing grid view in a output.xaml and having an event in the ViewModel.

Calling this event while adding new items in the other screen (to add the Grid view Headers).

Add couple of Headers and click the Output tab to view the values in the Grid View. Now its showing the grid with parent child relationship and the headers.

Now if I go and add a new header then the event will be called in the ViewModel of the output and binding the grid to show the new headers and the relevant values for the column. Here I am facing problem that while re-binding it takes time and binding the grid without the self referencing hierarchy. it just binds all the rows in the datatable property as the parent node.

Anybody knows where i have made the mistake.

Thanks,
Ramasamy

Ramasamy
Top achievements
Rank 1
 asked on 05 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?