This is a migrated thread and some comments may be shown as answers.

[Solved] Silverlight GridView RowDetail Issue

6 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Suraj Batra
Top achievements
Rank 1
Suraj Batra asked on 17 Dec 2009, 02:04 PM
Is there any way to hide (Silverlight) grid's row while we are displying its Details i.e. as soon as row is selected, its details become visible but grid row (which is just selected) itself is hided.

6 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 18 Dec 2009, 10:05 AM
Hello Suraj Batra,

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.
0
Suraj Batra
Top achievements
Rank 1
answered on 21 Dec 2009, 10:32 AM
Hi Ross,

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
0
Kalin Milanov
Telerik team
answered on 21 Dec 2009, 11:19 AM
Hello 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.
0
Suraj Batra
Top achievements
Rank 1
answered on 22 Dec 2009, 08:54 AM
Hi Kalin,

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

 

 

0
Accepted
Kalin Milanov
Telerik team
answered on 22 Dec 2009, 10:47 AM
Hi 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.
0
Suraj Batra
Top achievements
Rank 1
answered on 22 Dec 2009, 01:54 PM
Hi Kalin,

Thanks a lot for prompt reply. With latest binaries it worked perfectly.

Again thanks a lot.

Thank you,
Suraj Batra
Tags
GridView
Asked by
Suraj Batra
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Suraj Batra
Top achievements
Rank 1
Kalin Milanov
Telerik team
Share this question
or