Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
5418 | Jul 2,2003 05:13 AM UTC | Jul 2,2003 09:40 AM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
GridBoundColumn clmnStyle_rCode = gridBinder.InternalColumns["rCode"];
clmnStyle_rCode.HeaderText = "Code";
clmnStyle_rCode.StyleInfo.CellValueType = typeof(string);
clmnStyle_rCode.StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Right;
attempts to get the GBC from the parent grid's GBC collection, and modify it and put it in the child grid's GBC collection. A couple of sticky points here. One is the mappingnames for the two columns are not necessarily the same, are they? So, you may want to change that property as well. Another problem is that you are modifying a reference to the parent GBC. This will cause problems. So, instead of your first line above, try this:
GridBoundColumn clmnStyle_rCode = gridBinder.InternalColumns["rCode"].Clone();
There may be other problems, but maybe not...
this.adptInput.Fill(this.dsInputList, "Input");
this.adptReel.Fill(this.dsInputList, "tblReel");
dsInputList.Relations.Add(
dsInputList.Tables[0].Columns["iID"],
dsInputList.Tables[1].Columns["rInputID"]);
dsInputList.Relations[0].RelationName = "Reels_Relation";
GridHierarchyLevel hlInput = gridBinder.RootHierarchyLevel;
GridHierarchyLevel hlInput_Reels = gridBinder.AddRelation("Reels_Relation");
//
// clmnStyle_rCode
//
GridBoundColumn clmnStyle_rCode = hlInput_Reels.InternalColumns["rCode"];
clmnStyle_rCode.HeaderText = "Code";
clmnStyle_rCode.MappingName = "rCode";
clmnStyle_rCode.StyleInfo.CellValueType = typeof(string);
clmnStyle_rCode.StyleInfo.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Right;
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.