or
| void RowFormatting_ImageChanging(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e) |
| { |
| GridRowHeaderCellElement grhce = e.RowElement.Children[0] as GridRowHeaderCellElement; |
| if (grhce != null) |
| { |
| GridViewEditableEntry aa = e.RowElement.RowInfo.DataBoundItem as GridViewEditableEntry; |
| if (aa != null) |
| { |
| if (aa.Changed) |
| grhce.Image = myimage1; |
| else if (aa.IsEditable) |
| grhce.Image = myimage2; |
| else if (!aa.IsEditable) |
| grhce.Image = myimage3; |
| } |
| else |
| { |
| grhce.Image = null; |
| } |
| } |
| } |
If DBConn.ConnectionString <> "" Then
daDataAdapter =
New SqlDataAdapter(CurrentBeo.sCurrentSql, DBConn)
daDataAdapter.Fill(DSData, CurrentBeo.sTableToUpdate)
bsMaintenance.DataSource = DSData
bsMaintenance.DataMember = CurrentBeo.sTableToUpdate
grdMain.DataSource = bsMaintenance
bnMain.BindingSource = bsMaintenance
End If
| private void populateGroupFactControls() | |
| { | |
| var level2Grids = from fact in activeJob.FactSet | |
| where fact.Level == 1 && fact.DataTypeDesc == p.factTypeGroup | |
| select new | |
| { | |
| GridName = uiUtility.CreateFactGridName(fact.FactName), | |
| Rows = | |
| from childFact in activeJob.FactSet | |
| where childFact.Level == 2 && childFact.ParentFactID == fact.FactID | |
| join factValue in activeDataElement.Values | |
| on childFact.FactID equals factValue.FactID | |
| group factValue by factValue.GroupInstanceID | |
| into rowCells | |
| select new | |
| { | |
| RowID = rowCells.Key, | |
| Cells = rowCells | |
| } | |
| }; | |
| foreach(var grid in level2Grids) | |
| { | |
| var gridControl = (RadGridView) groupFactTable.Controls.Find(grid.GridName, true).First(); | |
| gridControl.Rows.Clear(); | |
| foreach(var row in grid.Rows) | |
| { | |
| GridViewRowInfo newRow = gridControl.Rows.AddNew(); | |
| newRow.Cells[p.RowID].Value = row.RowID; | |
| foreach(var cell in row.Cells) | |
| { | |
| newRow.Cells[cell.FactID].Value = cell.InstanceValue; | |
| } | |
| } | |
| gridControl.Refresh(); // Doesn't seem to help | |
| } | |
| groupFactTable.Refresh(); // Doesn't seem to help either | |
| } | |