Telerik Forums
UI for WPF Forum
1 answer
54 views
Hi all;

First, I need to preface this by saying I'm a newbie when it comes to the WPF world.  But I'm having some trouble with the design time experience for WPF grid view.  Can anybody summarize how I can set up a design time experience that lets me work with the data I'll be using at runtime, so that I don't wind up with XML parser errors on the design surface, rather than a representation of my grid?

For example, if I set up a grid similar to the following:
    <Grid> 
        <telerik:RadGridView Margin="0" Name="radGridView1" AutoGenerateColumns="False"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewColumn UniqueName="salesperson_name" IsVisible="False"/> 
            </telerik:RadGridView.Columns> 
            <telerik:RadGridView.GroupDescriptions> 
                <telerik:RadGroupDescription PropertyName="salesperson_name" SortDirection="Ascending"/> 
            </telerik:RadGridView.GroupDescriptions> 
        </telerik:RadGridView> 
    </Grid> 

I wind up with an Unhandled Exception on the design surface.

Thanks,
Jason


Hristo Deshev
Telerik team
 answered on 21 May 2009
3 answers
319 views
Hello. 

I'm back with more questions and problems.

  1. When inserting new row into master grid (master/child scenario), new row is out of alignment with other rows. This is clearly a bug?
  2. When cell in grid has focus, routed commands (trigerred through button in a toolbar) get selected GridViewCell as ExecutedRoutedEventArgs.OriginalSource. When only row has focus (row is selected but no cell has focus) nothing (button itself) is returned as OriginalSource. Shouldn't selected GridViewRow be passed in OriginalSource?
  3. 4. After adding new record to child grid (in a way explained here here), that new row is immediately removed. I add record to database (LINQ) in RowEditEnded, so after restarting an application record does show. The cause seems to be RadGrid not inserting data into underlying LINQ container. This does not happen in master grid. Child grid ItemsSource is set to "{Binding MasterRecord.Data.Addresses}". Addresses is a property of class EntitySet. The workaround is adding new record manually into this collection, which works fine, but I'd like to know this this is the way it's supposed to be or is it some kind of bug (my code or RadGrid doing something wrong).
  4. I'm using binding validation (based on IDataErrorInfo implemented in business objects). I have problems marking cells that have validation errors. Setting Validation.ErrorTemplate has more or less unpredictable results. So I use code like this:
        <Style TargetType="{x:Type telerik:GridViewCell}"
            <Style.Triggers> 
                <Trigger Property="Validation.HasError" Value="true"
                    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" /> 
                    <Setter Property="Background" Value="Red" /> 
                </Trigger> 
            </Style.Triggers> 
        </Style> 
  • This leaves misaligned red borders (where inserted cells were marked red for validation errors) in first row even after row has been commited and moved. This remains in place event when scrolling grid. It works fine for row's that were already in database or were only modified, but not for new rows.
  • Red background does not show for fields containging date.

Thanks.
Branko
Nedyalko Nikolov
Telerik team
 answered on 21 May 2009
1 answer
315 views
Can you please post some sample code as to how I could change the theme for a chart in code behind?  I just want to switch from the balck theme to either Vista or Simple.

 For the life of me I can't find the method or property to set.

Thanks!!

--Tad Richard
Ves
Telerik team
 answered on 21 May 2009
1 answer
103 views
If tabbing into a TimePicker control, can it be changed to select all the text instead of setting it into a character position?
Bobi
Telerik team
 answered on 20 May 2009
1 answer
107 views
I have a RadGridView on a page defined as :

 

 

<Grid Height="115">

 

 

 

<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding PatientMedications}">

 

 

 

<telerik:RadGridView.Columns>

 

 

 

<telerik:GridViewDataColumn Width="2*" HeaderText="Name" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Drug_.Name}" UniqueName="{x:Null}"/>

 

 

 

<telerik:GridViewDataColumn Width="3*" HeaderText="Dosage" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Dosage}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="85" HeaderText="Started" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=StartTime}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="85" HeaderText="Ended" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=EndTime}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="*" HeaderText="Comments" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Comments}" UniqueName="{x:Null}" />

 

 

 

</telerik:RadGridView.Columns>

 

 

 

</telerik:RadGridView>

 

 

 

</Grid>

 


My problem is that it is forcing the with of its bounding container to expand instead of its own size being set by the container.  I want the grid to expand to the full size of its bounding container.

What do I need to do to accomplish this?

Thanks,

Billy Jacobs
StevenDale
Top achievements
Rank 2
 answered on 20 May 2009
4 answers
170 views
Hello all,
Are there any built-in themes for RadExpander? And what are the advantages of it over the Expander from the WPF framework?

Thanks,
Kenny.
Kenny
Top achievements
Rank 1
 answered on 20 May 2009
6 answers
421 views
I am loading one grid that will need to be filtered by user input of a value in a seperat textbox. The filter is a CONTAINS filter on one column of the grid.

Basically as the user types, the available values need to go down to better and better match the input. Do you guys have a good example of this?

Note: Values are plain text CONTAINS matching, so no special custom filters seem to be needed.
Kenny
Top achievements
Rank 1
 answered on 20 May 2009
1 answer
54 views
Another question is how do we set the initial time to null or blank instead of 00:00 ?  Sorry, the docs seem kinda sparse..
Bobi
Telerik team
 answered on 20 May 2009
7 answers
231 views
Is it possible to use the first look example with objects?

I have a list of objectA and each object has 3 sublists. I want to display each sublist in a tab when the parent record is expanded, similar to the first look example provided.

I have managed a workaround by modifying the Custom Row Layout example and using an expander but it is not as clean as the First Look Example.

Thanks,

Billy Jacobs
Vlad
Telerik team
 answered on 20 May 2009
6 answers
145 views
Hi,


In your documentation, it quotes "or programmatically by using the StartEdit() method of the RadTreeViewItem.". I have a treeviewitem, but VS complains; StartEdit is not a member of RadTreeviewItem.

Have I missed something, or was this method omitted from the build.

My requirement is to startedit a RadTreeviewItem in code


Thanks


P

Miroslav
Telerik team
 answered on 19 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?