6 Answers, 1 is accepted
This might be possible, but it will not be simple. You will need to edit the GridViewRow template and modify its Selected visual state. You should modify the visual state to hide the all the parts of the row that you do not want to see when the row is selected.
All the best,
Ross
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
In my code I tried to set the visibility dependency property of GridViewRow's template to collapsed using the following line of code.
template.SetValue(VisibilityProperty, Visibility.Collapsed);
This line throws Catastrophic error at runtime.
Can you please provide some sort of code snippet for modifying the visual state (as mentioned in your reply).
Thank You,
Suraj Batra
Please find attached a sample which hides the row when selected and shows the row details instead.
All the best,
Kalin Milanov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I used the code provided by you. I faced problems in using that code. First, the "GridLineWidthToThicknessConverter" is not available in following namespace
xmlns
:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
The other problem occurs when I run the application (after making changes, as specified in your sample code). Following exception is thrown when Usercontrol is being rendered (the usercontrol which contains these changes). Following is the exception stack trace
Error HRESULT E_FAIL has been returned from a call to a COM component.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
I googled this issue but couldn't found anything useful on this issue.
Thank You,
Suraj Batra
The sample I have sent you uses our latest internal build binaries. Could you please update to that version and tell me if you are still getting the error.
Best wishes,
Kalin Milanov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thanks a lot for prompt reply. With latest binaries it worked perfectly.
Again thanks a lot.
Thank you,
Suraj Batra