상세 컨텐츠

본문 제목

True Dbgrid

카테고리 없음

by tolirawi1988 2020. 3. 3. 02:26

본문

True Dbgrid

True Dbgrid 7

Delphipublic property RowColChange:read removeRowColChange write addRowColChange;RemarksThis event is triggered under several circumstances: When the gridis first displayed. When the usermoves the current cell by clicking another cell or using the navigation keys. When data inthe grid is changed in a way that implicitly affects the current row, such aswhen the current row is deleted when it is the last row in the grid. When the, orproperties are changed in code to a different value.The current cell position is provided by the andproperties. The previous cell position is specified by theandproperties.If the user edits data and then moves the current cellposition to a new row, the update events for the original row are completedbefore another cell becomes the current cell.If a cell change also results in a change to the currentsplit, then the event will alwaysprecede the RowColChange event.ExampleThe following code sets the state of the expand/collapseradio buttons on row change. Private SubC1TrueDBGrid1RowColChange(ByVal sender As Object, ByVal e AsC1.Win.C1TrueDBGrid.RowColChangeEventArgs) HandlesC1TrueDBGrid1.RowColChange'Get the type/state of the row.Dimrtype As C1.Win.C1TrueDBGrid.RowTypeEnum =Me.C1TrueDBGrid1.Splits(0).Rows(Me.C1TrueDBGrid1.Row).RowTypeSelect Case rtypeCaseC1.Win.C1TrueDBGrid.RowTypeEnum.CollapsedGroupRowMe.radioButton2.Checked = TrueCaseC1.Win.C1TrueDBGrid.RowTypeEnum.ExpandedGroupRowMe.radioButton1.Checked = TrueEndSelectEnd Sub. ProcedureC1TrueDBGrid1RowColChange(sender: System.Object; e:C1.Win.C1TrueDBGrid.RowColChangeEventArgs);varrtype:C1.Win.C1TrueDBGrid.RowTypeEnum;begin// Get thetype/state of the row.rtype:=Self.C1TrueDBGrid1.Splits0.RowsSelf.c1TrueDBGrid1.Row.RowType;case rtypeofC1.Win.C1TrueDBGrid.RowTypeEnum.CollapsedGroupRow:beginSelf.RadioButton2.Checked:= True;Exit;end;C1.Win.C1TrueDBGrid.RowTypeEnum.ExpandedGroupRow):beginSelf.RadioButton1.Checked:= True;Exit;end;end;end;For a full example using the RowColChange event, see the ToggleGroupRows sample located on.See Also.