Hello,
Is it possible to change all the XamDataGrid cells height dynamically in procedural code? If so, how could I do it?
Thanks.
Hi Huanhe,
I am just checking on your progress and whether you still require assistance on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Hello Huanhe,
I have been trying to reproduce this exception on my side, but to no avail .Would you attach a small project replicating this so I can investigate it further.
Thanks in advance.
Regards Petar.
Hello Patar,
Thanks for your reply. I still got a window designer problem as I said in my previous post . Please see the details below:
'GridInfragistics is a user controlPrivate Sub GridInfragistics_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded If CellHeight > 0 Then grdTable.FieldSettings.CellHeight = CellHeight 'CellHeight is a dependency property End If End Sub
Here are the errors I got in a desinger window when I when I tried to load the user control in a window:
System.NullReferenceExceptionObject reference not set to an instance of an object. at UserControlsSpecific.GridInfragistics.GridInfragistics_Loaded(Object sender, RoutedEventArgs e) in C:\UserControlsSpecific\GridInfragistics.xaml.vb:line 35 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent) at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root) at MS.Internal.LoadedOrUnloadedOperation.DoWork() at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
This error didn't affect the runtime performance. It maybe some thing wrong with my other parts of code. But if you could provide a working example by wrapping an xamDataGrid in a user control with a dependency property and load that user control in another window, it will be great.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
If this is what you were looking for please verify the answer so it helps other users as well.
Sincerely,Petar MonovDeveloper Support EngineerInfragistics Bulgariawww.infragistics.com/support
Hello ,
I have been looking through your correspondence with Alex but am not sure what you mean by getting an exception in the designer. Also I tested out setting the Height property in its grid loaded event with no trouble. Perhaps you are using a different control’s loaded event and the one you are referring is not yet created. Another thing I noticed is that Alex had suggested the CellHeight property and you are using a different one. You might want to double check on that.
Please let me know if you require any further assistance on the matter.