Hi,
I have a standard datagrid on a screen and dynamically change the column headers based on other data. I would like to use this approach using the Infragistics grid so that I can make use of the summary row feature. I have imported the Infragistics.Controls.Grids namespace (VB.net please!) but cannot find the Grid element to replace 'DataGrid' in this code sample:
Private Sub PCVCtrl_Available(sender As Object, e As ControlAvailableEventArgs)
If TypeOf (e.Control) Is DataGrid Then _DG = CType(e.Control, DataGrid) End If
End Sub
Any ideas?
Regards,
Alan
HI,
Please let me know if you need further assistance regarding this case.
Sincerely, Matt Developer Support Engineer
Use the FindControl method to retrieve the XamGrid.
Here a Microsoft Help article on FindControl
http://social.msdn.microsoft.com/Forums/sk/lightswitch/thread/27fb9439-7d9a-4fa7-ba51-8a702f656ba3
Sincerely,
Matt Developer Support Engineer
I am still reviewing this issue.
Hi Matt,
thanks for the insight, that solved my problem with headers. Unfortunately, it still does not work as expected as the control does not fire the IsAvailable event as you alluded to in your response.
in the code below the InitialiseDataWorkspace sets up a handler on the xmGrid (ProjectCostAnalysisPLosts) so that when the xamGrid is created onn the page, i can then trigger the headertext changes.
Private Sub EditPLCosts_InitializeDataWorkspace(saveChangesTo As List(Of Microsoft.LightSwitch.IDataService)) ' Write your code here. AddHandler FindControl("ProjectCostAnalysisPLCosts").ControlAvailable, AddressOf PLCtrl_Available End Sub
Private Sub PLCtrl_Available(sender As Object, e As ControlAvailableEventArgs)
If TypeOf (e.Control) Is DataGrid Then _DG = CType(e.Control, DataGrid) End If End Sub
Is there a way to handle this scenario.