private void Docu_RowLoaded(object sender, RowLoadedEventArgs e) { HyperlinkButton hl; GridViewRow row = e.Row as GridViewRow; if (row != null) { DocuSignDocStatusInfo ed = row.DataContext as DocuSignDocStatusInfo; if (row != null && ed != null) { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnHistory") { hl = Cell.FindChildByType <HyperlinkButton>(); if (ed.envelopeId != null && ed.envelopeId != "" && ed.envelopeId != Guid.Empty.ToString()) { hl.Visibility = Visibility.Visible; } else { hl.Visibility = Visibility.Collapsed; } } } } } }
private void Signer_RowLoaded(object sender, RowLoadedEventArgs e) { HyperlinkButton hl; GridViewRow row = e.Row as GridViewRow; if (row != null) { Recipient ed = row.DataContext as Recipient; if (row != null && ed != null) { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnDelete") { hl = Cell.FindChildByType <HyperlinkButton>(); if (!ed.ManualAdded) { hl.Visibility = Visibility.Collapsed; } else { hl.Visibility = Visibility.Visible; } } } } } }
public void BaseDataGrid_Formating(object sender, RowLoadedEventArgs e) { contador = contador + 1; System.Type Tipo = e.Row.Cells.GetType(); if ((contador % 2) == 0) { e.Row.Background = new SolidColorBrush(Colors.LightGray); } else { e.Row.Background = new SolidColorBrush(Colors.WhiteSmoke); } bool Valor; Valor = Tipo.IsValueType; if (Valor) { e.Row.Cells.ToString(); // column.DataFormatString = "{0:F0}"; } }
private void GridViewKnownHands_RowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row is GridViewRow row) { RadContextMenu.SetContextMenu(row, handsGridContextMenu); } }
private void DeletedItemGrid_RowLoaded(object sender, RowLoadedEventArgs e) { HyperlinkButton hl; Image img; GridViewRow row = e.Row as GridViewRow; if (row != null) { DeletedItem rm = row.DataContext as DeletedItem; if (row != null && rm != null) { if (((App.Current as App).CurrentAction != "EDIT") || EstimateList.revisiontypepermission.ReadOnly) { foreach (GridViewCell Cell in row.Cells) { hl = Cell.FindChildByType <HyperlinkButton>(); if (hl != null && hl.Name == "btnReAdd") { hl.IsEnabled = false; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } } } } } }
private void RadTreeListView1_OnRowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row is GridViewRow) { foreach (var cell in e.Row.Cells) { var item = cell.DataContext as ITreeViewItemViewModel; if (item != null && item.Item.Level == -1) { var border = cell.Content as Border; if (border == null) return; var textBlock = border.Child as TextBlock; if (textBlock == null) return; textBlock.Text = string.Empty; } } } }
private void AssociatedObject_RowLoaded(object sender, RowLoadedEventArgs e) { if (AllowDrag) { RadDragAndDropManager.SetAllowDrag(e.Row, true); } }
private void RowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row is GridViewRow) { e.Row.ChildrenOfType <Border> ().Where(b => b.Name == "Background_Current").ToList().ForEach( b => b.BorderThickness = new Thickness(0)); } }
private void VehicleInventoryGrid_RowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row.DataContext is PortStorageVehicleProp) { System.Windows.Media.Color colReq = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#F7D7D5"); System.Windows.Media.Color colOut = (System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#D5D7F7"); e.Row.Background = (e.Row.DataContext as PortStorageVehicleProp).VehicleStatus == "OutGated" ? new System.Windows.Media.SolidColorBrush(colOut) : (e.Row.DataContext as PortStorageVehicleProp).VehicleStatus == "Requested" ? new System.Windows.Media.SolidColorBrush(colReq) : null; } }
private void AssociatedObject_RowLoaded(object sender, RowLoadedEventArgs e) { if (AllowDrop) { RadDragAndDropManager.SetAllowDrop(e.Row, true); RadDragAndDropManager.AddDropQueryHandler(e.Row, OnDropQuery); RadDragAndDropManager.AddDropInfoHandler(e.Row, OnDropInfo); } }
void RadGridView1_RowLoaded(object sender, RowLoadedEventArgs e) { GridViewRow row = e.Row as GridViewRow; Employee employee = e.DataElement as Employee; if (row != null && employee != null) { row.IsExpandable = this.HasSubordinates(employee); } }
private void dgPortfolioDetails_RowLoaded(object sender, RowLoadedEventArgs e) { GridViewRow row = e.Row as GridViewRow; var data = e.DataElement as PortfolioDetailsData; if (data != null && row != null) { row.IsExpandable = data.IsExpanded; } }
/// <summary> /// Auto row number /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="RowLoadedEventArgs"/> instance containing the event data.</param> protected void OnRowLoaded(object sender, RowLoadedEventArgs e) { var gridview = (RadGridView)sender; int index = gridview.ItemContainerGenerator.IndexFromContainer(e.Row); if (e.Row.Item != null) { ((BaseEntity)e.Row.Item).RowNumber = index + 1; } }
private void gridView_RowLoaded(object sender, RowLoadedEventArgs e) { // When the grid is first loaded, // the first row is always selected // if then the user clicks on'Delete' button // well, you know what happens // is there any other way of doing this? if (e.Row.IsSelected) { e.GridViewDataControl.CurrentItem = null; } }
private void clubsGrid_RowLoaded(object sender, RowLoadedEventArgs e) { var row = e.Row as GridViewRow; if (row == null) return; var selectedBinding = new Binding("IsSelected"); selectedBinding.Source = row.Item; selectedBinding.Mode = BindingMode.TwoWay; row.SetBinding(GridViewRow.IsSelectedProperty, selectedBinding); }
private void GridViewReport_RowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row is GridViewRow row) { if (reportGadgetViewModel.ReportSelectedItemStat == EnumReports.Tournaments) { RadContextMenu.SetContextMenu(row, tournamentsGridContextMenu); } else { RadContextMenu.SetContextMenu(row, reportsGridContextMenu); } } }
/// <summary> /// setting tooltip on grid cells when is getting grid loaded with data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgRelativePerformance_RowLoaded(object sender, RowLoadedEventArgs e) { //GroupedGridRowLoadedHandler.Implement(e); if (e.Row is GridViewHeaderRow) { return; } if (e.Row.Cells[0] is GridViewFooterCell) { return; } foreach (GridViewCell cell in e.Row.Cells) { //null check if (cell.Value == null) { continue; } //no tooltip service for CountryId column if (cell.Column.DisplayIndex == 0) { continue; } //no tooltip service for Totals column if (cell.Column.DisplayIndex == this.dgRelativePerformance.Columns.Count - 1) { continue; } //no toolTip service for blank cells if ((cell.Value as RelativePerformanceCountrySpecificData).Alpha == null) { continue; } decimal?activePosition = (cell.Value as RelativePerformanceCountrySpecificData).ActivePosition; ToolTip toolTip = new ToolTip() { Content = String.Format("{0:0.00}", activePosition) }; ToolTipService.SetToolTip(cell, toolTip); } }
private void AssociatedObjectRowLoaded(object sender, RowLoadedEventArgs e) { var row = e.Row as GridViewRow; if (row != null) { var toolTip = new ToolTip { Content = row.DataContext, ContentTemplate = ToolTipDataTemplate, }; ToolTipService.SetToolTip(row, toolTip); } }
void grdUsers_RowLoaded(object sender, RowLoadedEventArgs e) { var user = e.DataElement as UserRowViewModel; if (user == null) { return; } if (user.Inactive) { e.Row.Foreground = new SolidColorBrush(Colors.DarkGray); } }
private void clubsGrid_RowLoaded(object sender, RowLoadedEventArgs e) { var row = e.Row as GridViewRow; if (row == null) { return; } var selectedBinding = new Binding("IsSelected"); selectedBinding.Source = row.Item; selectedBinding.Mode = BindingMode.TwoWay; row.SetBinding(GridViewRow.IsSelectedProperty, selectedBinding); }
private void DtgRelationships_RowLoaded(object sender, RowLoadedEventArgs e) { if (e.DataElement is RelationshipDTO) { var rel = (e.DataElement as RelationshipDTO); var cell = e.Row.Cells.FirstOrDefault(x => x.Column.UniqueName == "DeleteOption"); if (cell != null) { cell.IsEnabled = false; if (rel.TypeEnum != Enum_RelationshipType.None && rel.MastertTypeEnum == Enum_MasterRelationshipType.FromPrimartyToForeign) { cell.IsEnabled = true; } } if (rel.AnyForeignKeyIsPrimaryKey) { cell = e.Row.Cells.FirstOrDefault(x => x.Column.UniqueName == "IsDisabled"); if (cell != null) { cell.IsEnabled = false; } if (rel.MastertTypeEnum == Enum_MasterRelationshipType.FromForeignToPrimary) { cell = e.Row.Cells.FirstOrDefault(x => x.Column.UniqueName == "DataEntryEnabled"); if (cell != null) { cell.IsEnabled = false; } } cell = e.Row.Cells.FirstOrDefault(x => x.Column.UniqueName == "IsReadonly"); if (cell != null) { cell.IsEnabled = false; } cell = e.Row.Cells.FirstOrDefault(x => x.Column.UniqueName == "IsNotTransferable"); if (cell != null) { cell.IsEnabled = false; } } } }
private void OnRowLoaded(object sender, RowLoadedEventArgs e) { if (!(e.Row is GridViewRow)) { return; } foreach (var cell in e.Row.Cells) { if ((string)cell.Column.Header == "Due Date") { var g = (InvoiceListItemViewModel)cell.DataContext; if (g.DueDate < DateTime.Now && g.Delivered) { cell.Foreground = new SolidColorBrush(Colors.Red); } } } }
private void GridViewDataControl_OnRowLoaded(object sender, RowLoadedEventArgs e) { var row = e.Row as GridViewRow; if (row != null) { row.IsExpandable = false; var dc = DataContext as ProcessViewsViewModel; if (dc != null) { var field = row.DataContext as ProcessViewFieldEdit; if (field != null) { var sectionTemplate = dc.SelectedSectionTemplate; var fieldTemplate = sectionTemplate.Fields.FirstOrDefault(f => f.Guid == field.TemplateFieldGuid); row.IsExpandable = fieldTemplate != null && fieldTemplate.CustomConfigurator != null; } } } }
void ListView_RowLoaded(object sender, RowLoadedEventArgs e) { var listItem = e.DataElement as ListItemModelBase; var row = ListView.ItemContainerGenerator.ContainerFromItem(listItem) as GridViewRow; if (row != null) { var status = ListView.ItemContainerGenerator.Status; // row.SetBinding(GridViewRow.IsExpandedProperty, new Binding(){Source = listItem,Path = new PropertyPath("IsExpanded"),Mode = BindingMode.TwoWay}); //if (listItem.IsSelected) // row.IsSelected = listItem.IsSelected; // row.IsExpanded = false; //row.IsExpanded = true; ListView.ExpandHierarchyItem(listItem); //ListView.ExpandHierarchyItem(listItem); // row.SetBinding(TreeListViewRow.IsSelectedProperty, new Binding("IsSelected")); } }
private void dataGridView1_CellFormatting(object sender, RowLoadedEventArgs e) { // If the column is the Artist column, check the // value. // MessageBox.Show("tipo celda", e.Row.Cells(0).); //if (this.dataGridView1.Columns[e.ColumnIndex].Name == "Artist") //{ // if (e.Value != null) // { // // Check for the string "pink" in the cell. // string stringValue = (string)e.Value; // stringValue = stringValue.ToLower(); // if ((stringValue.IndexOf("pink") > -1)) // { // e.CellStyle.BackColor = Color.Pink; // } // } //} //else if (this.dataGridView1.Columns[e.ColumnIndex].Name == "Release Date") //{ // ShortFormDateFormat(e); //} }
/// <summary> /// Row Loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgCOASpecific_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomizationforCOASpecificGadget(e); }
private void DtgActionTargets_RowLoaded(object sender, RowLoadedEventArgs e) { CheckRollTypeCell(e.Row); }
private void GridViewDataControl_OnRowLoaded(object sender, RowLoadedEventArgs e) { //throw new System.NotImplementedException(); }
/// <summary> /// dgFinstat RowLoaded EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">RowLoadedEventArgs</param> private void dgFinstat_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomization(e, false); }
private void Grid_OnDataLoaded(object sender, RowLoadedEventArgs e) { Brush scb = null; if (grid != null) { var vm = grid.DataContext as IFieldViewModel; if (vm != null) { scb = vm.Background; } } var row = e.Row as GridViewRow; if (row != null) { row.Background = scb; } }
/// <summary> /// dgFinancialReport RowLoaded EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">RowLoadedEventArgs</param> private void dgFinancialReport_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomization(e); }
static void grid_RowLoaded(object sender, RowLoadedEventArgs e) { if (e.Row is GridViewHeaderRow || e.Row is GridViewNewRow || e.Row is GridViewFooterRow) return; GridViewRow row = e.Row as GridViewRow; DragDropManager.RemoveDragOverHandler(row, OnRowDragOver); DragDropManager.AddDragOverHandler(row, OnRowDragOver); }
private void RadGridView1_RowLoaded(object sender, RowLoadedEventArgs e) { HyperlinkButton hl; TextBlock tb; Image img; GridViewRow row = e.Row as GridViewRow; if (row != null) { EstimateDetails ed = row.DataContext as EstimateDetails; if (row != null && ed != null) { if (ed.AreaId == 43) { if (/*EstimateList.revisiontypepermission.AllowToAddNSR && */ !EstimateList.revisiontypepermission.ReadOnly) //All revisions can now add NSR { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnAddOption") { hl = Cell.FindChildByType <HyperlinkButton>(); tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 1; hl.IsEnabled = true; img = Cell.FindChildByType <Image>(); img.Opacity = 1; } else if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnCopy") { hl = Cell.FindChildByType <HyperlinkButton>(); hl.IsEnabled = false; tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 0.3; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } } } else { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnAddOption") { hl = Cell.FindChildByType <HyperlinkButton>(); tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 0.3; hl.IsEnabled = false; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } else if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnCopy") { hl = Cell.FindChildByType <HyperlinkButton>(); hl.IsEnabled = false; tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 0.3; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } } } } else { if (!EstimateList.revisiontypepermission.ReadOnly) { if (!EstimateList.revisiontypepermission.AllowToAddNSR) { //All revisions can now add NSR /* * foreach (GridViewCell Cell in row.Cells) * { * if (Cell.FindChildByType<HyperlinkButton>() != null && Cell.FindChildByType<HyperlinkButton>().Name == "btnAddOption") * { * hl = Cell.FindChildByType<HyperlinkButton>(); * tb = Cell.FindChildByType<TextBlock>(); * tb.Opacity = 1; * hl.IsEnabled = true; * img = Cell.FindChildByType<Image>(); * img.Opacity = 1; * } * else if (Cell.FindChildByType<HyperlinkButton>() != null && Cell.FindChildByType<HyperlinkButton>().Name == "btnCopy") * { * hl = Cell.FindChildByType<HyperlinkButton>(); * hl.IsEnabled = false; * tb = Cell.FindChildByType<TextBlock>(); * tb.Opacity = 0.3; * img = Cell.FindChildByType<Image>(); * img.Opacity = 0.3; * } * } */ } else { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnAddOption") { hl = Cell.FindChildByType <HyperlinkButton>(); tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 1; hl.IsEnabled = true; img = Cell.FindChildByType <Image>(); img.Opacity = 1; } else if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnCopy") { hl = Cell.FindChildByType <HyperlinkButton>(); hl.IsEnabled = true; tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 1; img = Cell.FindChildByType <Image>(); img.Opacity = 1; } } } } else { foreach (GridViewCell Cell in row.Cells) { if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnAddOption") { hl = Cell.FindChildByType <HyperlinkButton>(); tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 0.3; hl.IsEnabled = false; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } else if (Cell.FindChildByType <HyperlinkButton>() != null && Cell.FindChildByType <HyperlinkButton>().Name == "btnCopy") { hl = Cell.FindChildByType <HyperlinkButton>(); hl.IsEnabled = false; tb = Cell.FindChildByType <TextBlock>(); tb.Opacity = 0.3; img = Cell.FindChildByType <Image>(); img.Opacity = 0.3; } } } } } } }