Telerik Forums
UI for WPF Forum
8 answers
495 views
Hello,
I've implemented a multi-select ComboBoxColumn using checkboxes as follows:
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding AppointmentTimes}" UniqueName="AppointmentTimes" Header="Scheduled Appointments" ItemsSourceBinding="{Binding AvailableTimes}" EditTriggers="CellClick">
     <telerik:GridViewComboBoxColumn.ItemTemplate>
          <DataTemplate>
               <StackPanel Orientation="Horizontal">
                    <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding TimeDisplay}" />
               </StackPanel>
          </DataTemplate>
     </telerik:GridViewComboBoxColumn.ItemTemplate>
     <telerik:GridViewComboBoxColumn.EditorStyle>
          <Style TargetType="telerik:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle1}">
                <Setter Property="OpenDropDownOnFocus" Value="True"/>
          </Style>
     </telerik:GridViewComboBoxColumn.EditorStyle>
</telerik:GridViewComboBoxColumn>

Everything works great except I'd like the user to be able to select the checkboxes using the spacebar.  How can I achieve this?

Thanks in advance..
Konstantina
Telerik team
 answered on 14 Sep 2012
5 answers
292 views
Hi,

We are currently using a RichTextBox to display simple HTML content.

To style the content, we are using this code:

this.htmlDataProvider.RichTextBox.DefaultStyleSettings.SetPropertyValue(Span.UnderlineColorProperty, foregroundColour);
this.htmlDataProvider.RichTextBox.DefaultStyleSettings.SetPropertyValue(Span.ForeColorProperty, foregroundColour);
this.htmlDataProvider.RichTextBox.Background = new SolidColorBrush(backgroundColour);
this.htmlDataProvider.RichTextBox.FontSize = this.noteStyles.DefaultFontSize;
this.htmlDataProvider.RichTextBox.FontFamily = new FontFamily(font.Source);

However, this leaves list icons and list numbers without a style applied: http://i.imgur.com/rbwx4.png

How can I apply a default style to those elements too?

Thanks.
Mihail
Telerik team
 answered on 14 Sep 2012
1 answer
99 views
Hi,

We have a RadGridView with some custom column implementations, changeing the original value bound to this columns. Now we have the problem, that the default sort mechanism sorts the rows with the original values from the data source, but it should be sorted with the displayed column values. I also can not use the expression sort descriptors, I have no access to the displayed type at compoleing time.

Is there a way to change this behavior?

Thanks for help,
Michael
Rossen Hristov
Telerik team
 answered on 14 Sep 2012
0 answers
222 views
Hi,

I tried adding and event trigger on my GridViewDataColumn but it doesn't seem to fire the command.

<telerik:GridViewDataColumn CellStyle="{StaticResource IndexColumnStyle}"
                                            DataMemberBinding="{Binding Index}"
                                            Header="Index"
                                            IsReadOnly="True">
<i:Interaction.Triggers>
<i:EventTrigger EventName="CellDoubleClick">
<GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding EditCommand}"
CommandParameterValue="Edit"
PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:GridViewDataColumn>

Is it actually possible to add event trigger to GridViewDataColumn?
Mark
Top achievements
Rank 1
 asked on 14 Sep 2012
1 answer
118 views
sorry new to WPF
i'm having trouble understanding how to load the RadDiagramToolbox from codebehind with the standard shape.

Any help is greatly appreciated

FF
Petar Mladenov
Telerik team
 answered on 14 Sep 2012
0 answers
417 views
I have a column

       <telerik:GridViewDataColumn

                    UniqueName="CarrierCommission"

                                  DataFormatString="c"

                                  IsVisible="{Binding Path=SearchCriteria, Converter={StaticResource CarrierColumnConverter}}"

                                  Header="{StaticResource CarrierCommission}"

                                  DataMemberBinding="{Binding Path=CarrierRepCommission}"

                                  Width="{StaticResource CommissionColumnWidth}">

        </telerik:GridViewDataColumn>

I would like to programmatically refresh the IsVisible property by calling UpdateTarget on the IsVisible binding expression.  However, it seems that no matter when I call

 

Dim exp As BindingExpression = column.GetBindingExpression(Telerik.Windows.Controls.GridViewDataColumn.IsVisibleProperty)


I always get null for the value of exp.  When is it safe to call GetBindingExpression or is there another way to refresh the binding.

Thanks,

Patrick
Top achievements
Rank 1
 asked on 13 Sep 2012
2 answers
124 views
Hello,

I"m having some troubles. I'm using this VirtualQueriableCollectionView with a RadCarousel. It's working well up until i change the VirtualItemCount in the ItemsLoading event. 

little more information:
We're using this VirtualQueriableCollectionView to load only a portion of the entire file. that part is working great.
On this control we have a TextBox that we use to search each column. unfortunately we're not using sql so we need to read each record and check the fields to see if any of them mach the TextBox text value. Doing it this way we wont know how many records we have in total so when we're finally done searching all of the records we will have a total count of records that match the textbox value and we'll need to change the VirtualItemCount in the ItemsLoading EventHandler. Now when i change the VirtualItemCount in my test wpf application it works just fine. But when i change it when it's hosted in WindowsForms (our main app is using winforms) I get "Collection was modified after the enumerator was instantiated.". 

I'm curious if you have any ideas of how i can work around this issue?

I hope that makes sense. If you need more information please let me know. I can hook you up with a test application too if needed.

Thanks Much,
~Boots
Boots
Top achievements
Rank 1
 answered on 13 Sep 2012
2 answers
188 views
Hi Team,

I have purchased the telerik licences  recently. I am using  RadBooK control for showing PDF file as needed the functionality  to change the pages horizontally(Swipe functionality).
But my requirement is also to have Zoom in/out and Panning feature by touch(and multi-touch also).

Please guide me for achieving this functionality. It will be great if you can also provide Code snippets or relevant links.

Thanks,
Mandeep Kaur. 
Darryn
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
151 views
We have a gridview.ItemSource = datafilter.FilterdSource and the datafilter.Source = datatable.DefaultView. When we (manually) generate the columns they are type of GridViewColumnBase and the columns to be updated are of DataType System.String. The gridview is set to readonly and we set some values in the background depending on user actions. Generally the action is based on a context menu click and we are accessing the record as (gridview.Items[i] as DataRowView). We then set the value of the cell by the column name and it works great but sometimes it will give us an exception saying the column 'x' is readonly... can't figure our why.

Routine to update is similar to the following:
string c = "ColumnUniqueName", v = "ValueToSet";
DataRowView r = (gridview.Items[i] as DataRowView);
r[c] = v; //her we get the error

Error:
Message: Column 'ColumnUniqueName' is read only.

Source: System.Data

Trace:    at System.Data.DataRow.set_Item(DataColumn column, Object value)
   at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
   at System.Data.DataRowView.set_Item(String property, Object value)


Guru
Top achievements
Rank 2
 answered on 13 Sep 2012
6 answers
531 views
I want to be able to disable default commands on the RadRichTextBox (for example the SaveCommand command), and have their corresponding shortcut keys bubble up the visual tree (so the SaveCommand command's Ctrl+S shortcut can be captured at the Window level).  I've tried two methods of disabling a command:

#1 - Disabling the command

rtb.Commands.SaveCommand.Enabled = false;


#2 - Handling the CommandExecuting event and cancelling the command

void RadRichTextBoxEx_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
    if (e.Command is SaveCommand)
        e.Cancel = true;
}


Unfortunately these methods seem to still mark the event as handled, and the KeyDown event never gets raised up the visual tree.  It seems this is a bug - is there a workaround or fix for it?

Thanks

Chris Anderson
Itamar
Top achievements
Rank 1
 answered on 13 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?