Telerik Forums
UI for WPF Forum
4 answers
338 views
I am using a GridView with a QueryableDataServiceCollectionView data source in a MVVM WPF application.

Relevant data involved (Entity Framework is in use on the server) are SecurityDomain, SecurityRole and SecurityDomainSecurityRole.

SecurityDomain and SecurityRole are EntityFramework entities with corresponding database tables.

SecurityDomainSecurityRole is a navigation property that is represented in the database as a table, but not as an EntityFramework entity. This navigation property represents the many to many relationship between SecurityDomain and SecurityRole.

I use the "expand" property of the QueryableDataServiceCollectionView to retrieve SecurityDomains along with each of their related SecurityRoles.

SecurityDomains = new QueryableDataServiceCollectionView<SecurityDomain>(odataServiceD.Service, odataServiceD.Entity);
SecurityDomains.Expand = "SecurityRoles";

Retrieve into grid works fine, as does update and delete of SecurityDomains.


The problem: When I add an existing SecurityRole to a SecurityDomain (that was not previously associated with that SecurityRole) and SubmitChanges(), the OData controller method on the server, "SecurityDomainController.PostToSecurityRoles" executes and successfully adds a row into the database table SecurityDomainSecurityRole, but whatever I return from this method crashes the client.


Using method signature "public IHttpActionResult PostToSecurityRoles([FromODataUri] int key, SecurityRole securityRole)", the following returns result in a "The context is already tracking a different entity with the same resource Uri." client crash:

return Created(securityRole); // securityRole is the parameter.

return Created(sr); // sr is the newly created securityRole object.

var location = String.Format("{0}/{1}({2})/{3}({4})", Request.RequestUri, "SecurityDomains", key, "SecurityRoles", sr.Id);
return Created(location, sr);


With the same signature, this return results in a "The response to this POST request did not contain a 'location' header. That is not supported by this client." client crash.

return StatusCode(HttpStatusCode.NoContent);


With the same signature, using a "Created(SecurityDomain)" style return result in  "No NavigationLink factory was found for the navigation property 'SecurityRoles' from entity type
'DB.Domain.Entities.SecurityDomain' on entity set 'SecurityRole'. Try calling HasNavigationPropertyLink on the EntitySetConfiguration" client crashes. These are the returns like this:

return Created(businessLayer.SecurityDomain(key));

var sd = businessLayer.WithSecurityRoles(key);
return Created(sd);


If I change the method signature to "public HttpResponseMessage PostToSecurityRoles([FromODataUri] int key, SecurityRole securityRole)", the following returns result in "The response to this POST request did not contain a 'location' header. That is not supported by this client." client crashes:

return Request.CreateResponse(HttpStatusCode.Created, securityRole);

return Request.CreateResponse(HttpStatusCode.NoContent);


So my question is basically what does the GridView/QueryableDataServiceCollectionView want to get back from the Odata controller? If the Grid just kept running and refreshed, everything would be fine. The database is getting updated correctly.

Thanks.
Greg
Top achievements
Rank 1
 answered on 30 Oct 2014
3 answers
150 views
Hi,

I am using XmlDataProvider to bind the contents of an xml file to treeview. My question is if I make any changes to xml file manually, do I need to recompile it everytime. Or the application will correctly refer to the Source path where I have updated the xml.


Thanks
Divya
Petar Mladenov
Telerik team
 answered on 30 Oct 2014
3 answers
387 views
I have a MEF Prism region defined in a RadPane.  As long as the pane is docked in the DocumentHost, everything works correctly.  However, if I pull the pane out of the host so that it is floating outside of the main application, Prism navigation does not work when I call RegionManager.RequestNavigate.  I then drag the pane back into the host, and navigation starts working, again.  Is there any known reason why navigation would work in one state but not the other?  Is there a work around?  I am running Telerik 2014 Q1.


<telerik:RadPane Header="Document Viewer" Name="ChartViewerPane"
                    telerik:RadDocking.SerializationTag="MyPane">
    <telerik:RadPane.Content>
        <ContentControl regions:RegionManager.RegionName="{x:Static inf:RegionNames.MyRegionName}"></ContentControl>
    </telerik:RadPane.Content>
</telerik:RadPane>

I tried following the directions in this blog post, but nothing changed once I added the code to my solution.

http://blogs.telerik.com/xamlteam/posts/13-12-11/using-raddocking-with-prism-in-wpf-silverlight
Максимейко
Top achievements
Rank 1
 answered on 30 Oct 2014
2 answers
274 views
I just upgraded from 2014 Q2 to 2014 Q3 for WPF and I am running into an issue that looks to be specific to the Windows 8 Touch theme on the TabControl.  I set the application wide theme using the following in my first window that loads:

Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.Windows8TouchTheme();

On a subsequent window that loads that contains a RadTabControl, the application will throw an exception:
System.Windows.Markup.XamlParseException : Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.
The inner exception is:
System.Xaml.XamlParseException : Prefix 'telerik1' does not map to a namespace.

The exception is throw from the ShowDialog() method being called on that window.  The kicker is that if I comment out my application-wide theme or switch it to the standard Windows 8 theme, the issue goes away, but obviously I am not using the theme I would like to.

Anybody run into this before or have any suggested workarounds to it?
Milena
Telerik team
 answered on 30 Oct 2014
9 answers
220 views
Hi,

in my project I have a chart with multiple bars, each bar have a label. I generated and ItemClick event to do something when the user click on a bar. I would like to know if it's possible to do the samething when the user click on each bar label because sometime the height of the bars is not visible and we can see only theirs labels.

Thank's
Petar Marchev
Telerik team
 answered on 30 Oct 2014
5 answers
274 views
Hi, 
currently I have a little issue while the Drag&Drop actions. I use 2 GridViews, from one of them the user can drag elements an drop it on a separate control (not the second GridView). The problem is that the mouse over symbol indicates that the user can drop the item on the second grid, which he can't ... 

How can I disable the drop option and show the user he can't drop elements on the second grid? 

Thanks!
Karlheinz
Top achievements
Rank 1
 answered on 30 Oct 2014
4 answers
187 views
Hello Telerik, 

where can I find or get the complied WPF UI demo source code (2014 Q3) inclusive the VS .sln.

Regards Uwe.
Yana
Telerik team
 answered on 30 Oct 2014
1 answer
110 views
I am updating an old VB 6 application to VS 2013 using the Telerik for WPF controls version 4.5.  I think we are moving to using the Tilegrid and tiles for the opening navigation.  We are anticipating moving to touch soon and this fits with most people's experience with smart phones.  I have laid out the Tilegrid and have some tiles working, and by the way very easy to use.  I just need some guidance and direction on how to proceed when the user clicks a tile or touches a tile.  I would like to have an input form open on top of the grid with the inputs needed and I would like it to animate up and over the tilegrid, and when the form is closed, have it shrink back down and out of site and reveal the Tilegrid again.

Does anyone have an example of how this works and the Telerik controls to use?  I don't need full solution, just a tile click and animated form to get started, I think I can take it from there.

Thanks.
Pavel R. Pavlov
Telerik team
 answered on 30 Oct 2014
1 answer
98 views
 Have a RadGridView with a RadContextMenu whice contains a RadMenuItem.
Clicking on that RadMenuItem should allow the user to edit the relavent GridViewCell.
In reallity the cell becomes ediable but doesn't accept any key strokes except Backspace, Enter and Esc.
How may I fix that?

Thanks!
Matan
Top achievements
Rank 1
 answered on 30 Oct 2014
4 answers
199 views
I am working on a Behavior to extend the GridView with CheckBoxes inside the group headers. To achieve this I created a System.Windows.Interactivity.Behavior where in the "Loaded" event of the GridView I add Eventhandlers to all Checkboxes in the group headers. To get a list of all GroupHeaderRow items I use the following code:

var groupHeaderRows =
    AssociatedObject.ChildrenOfType<GroupHeaderRow>().ToList();

This is working as expected, I get all group headers and can work with them. (Note: the "AssociatedObject" is the GridView to which the Behavior is attached to; the GroupRenderMode is "Flat".)

When a user changes the grouping be dragging/dropping a column to/from the group panel the "Grouped" event occurs. Unfortunately the list of GroupHeaderRow items is empty right after this event occurs and using the code above. On the other side I tried to respond to the "GroupDescriptors.CollectionChanged" event, but the list of GroupHeaderRows has not been refreshed which means I get the GroupHeaderRows of the old grouping before the collection was changed.
Now I am stuck. How can I get the list of all current GroupHeaderRow items after the user changed the grouping via UI?

Second question: how can I get the GroupHeaderRow that a selected item belongs to when I respond to the "SelectionChanged" event of the GridView?

TIA
Neils
Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 30 Oct 2014
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?