Hi,
I am developing a composite control with a radgrid in hierarchy.Everything works well for me except the Edit Form. I have created a new FormTemplate which inherits from the ITemplate class and use that as a formTemplate for my grid as
But for some reason my Edit Form always appears in the autogenerated mode. Is there something that I am missing?
Below given is the code which I am using:
Below is the code how I am intializing the grid and GridViewTable
Any help would be appreciated.
Regards,
Rakesh
I am developing a composite control with a radgrid in hierarchy.Everything works well for me except the Edit Form. I have created a new FormTemplate which inherits from the ITemplate class and use that as a formTemplate for my grid as
mainGrid.MasterTableView.EditFormSettings.EditFormType =new MyTemplate(); |
Below given is the code which I am using:
mainGrid.MasterTableView.EditMode =GridEditMode.PopUp; |
mainGrid.MasterTableView.EditFormSettings.CaptionDataField ="UnitNumber"; |
mainGrid.MasterTableView.EditFormSettings.InsertCaption ="Add new Reading"; |
mainGrid.MasterTableView.EditFormSettings.EditFormType =GridEditFormType.Template; |
mainGrid.MasterTableView.EditFormSettings.PopUpSettings.Modal =true; |
mainGrid.MasterTableView.EditFormSettings.FormTemplate = new MyTemplate(); |
mainGrid = new RadGrid(); |
mainGrid.AutoGenerateColumns =false; |
mainGrid.AllowSorting =true; |
mainGrid.AllowMultiRowSelection =false; |
mainGrid.ShowStatusBar =true; |
mainGrid.AllowPaging =true; |
mainGrid.AllowAutomaticUpdates =false; |
mainGrid.GridLines =GridLines.None; |
mainGrid.PagerStyle.Mode =GridPagerMode.NumericPages; |
mainGrid.MasterTableView.AllowMultiColumnSorting =true; |
string[] strDataKey ={"UnitNumber"}; |
mainGrid.MasterTableView.DataKeyNames =strDataKey; |
gtview.CommandItemDisplay=GridCommandItemDisplay.Top; |
gtview.CommandItemTemplate = new Template(); |
gtview.DataKeyNames =strDataKey; |
mainGrid.MasterTableView.DetailTables.Add(gtview); |
Regards,
Rakesh