private void DataGrid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     // Modify the header of the Name column.
     if (e.Column.Header.ToString() == "firstName")
     {
         e.Column.Header = "Vorname";
     }
     else if (e.Column.Header.ToString() == "lastName")
     {
         e.Column.Header = "Nachname";
     }
     else if (e.Column.Header.ToString() == "birthday")
     {
         e.Column.Header = "Geburtstag";
         (e.Column as DataGridTextColumn).Binding.StringFormat = "dd'.'MM'.'yyyy";
     }
     else if (e.Column.Header.ToString() == "accession")
     {
         e.Column.Header = "Eintrittsdatum";
         (e.Column as DataGridTextColumn).Binding.StringFormat = "dd'.'MM'.'yyyy";
     }
     else if (e.Column.Header.ToString() == "active")
     {
         e.Column.Header = "Aktiv";
     }
     else if (e.Column.Header.ToString() == "email")
     {
         e.Column.Header = "E-Mail";
     }
     else
     {
         e.Cancel = true;
     }
 }
Esempio n. 2
0
 void listofAll_MotherGeneratingColumns(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "daily_Nanny_required")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "nanny_required")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Comment")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Max_Distance")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "surrounding_Address")
     {
         e.Column.Header = "Near Address";
     }
     if (e.PropertyName == "Paymentmethode")
     {
         e.Column.Header = "Paymentmethod";
     }
 }
        private void downloadGrid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "id":
                e.Column.Visibility = Visibility.Hidden;
                break;

            case "done":
                e.Column.Visibility = Visibility.Hidden;
                break;

            case "title":
                e.Column.Header       = "タイトル";
                e.Column.DisplayIndex = 0;
                break;

            case "pfm":
                e.Column.Header       = "出演者";
                e.Column.DisplayIndex = 1;
                break;

            case "status":
                e.Column.Header       = "状態";
                e.Column.DisplayIndex = 2;
                break;

            default:
                throw new InvalidOperationException();
            }
        }
Esempio n. 4
0
 private void dgvEnvolvidos_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyType == typeof(System.DateTime))
     {
         (e.Column as DataGridTextColumn).Binding.StringFormat = "dd/MM/yyyy";
     }
 }
        private void DataGrid_OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            switch (e.PropertyName)
            {
                case "Bitrate":
                    e.Column.Header = Properties.Resources.columnBitrate;
                    e.Column.IsReadOnly = true;
                    e.Column.CanUserSort = true;
                    
                    break;
                case "ContentType":
                    e.Column.Header = "MIME(ContentType)";
                    e.Column.IsReadOnly = true;
                    break;

                case "Url":
                    var style = new Style(typeof (TextBlock));
                    style.Setters.Add(new EventSetter(Hyperlink.ClickEvent,(RoutedEventHandler)Hyperlink_Clickhandler));
                    var c = new DataGridHyperlinkColumn()
                    {
                        Header = Properties.Resources.columnUrl,
                        ElementStyle = style,
                        Binding = new Binding("Url"),
                        CanUserSort = true,
                        IsReadOnly = true
                    };
                    e.Column = c;
                    
                    
                    break;
            }
        }
Esempio n. 6
0
        private void DataGridPool_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
        {
            Style horizontalAlignment = new Style();

            horizontalAlignment.Setters.Add(new Setter(TextBlock.TextAlignmentProperty, TextAlignment.Center));


            switch (e.Column.Header.ToString())
            {
            case "IdBlu":
            case "IdRosso":
            case "SatrapiaRosso":
            case "SatrapiaBlu":
                e.Column.CanUserSort = false;
                e.Column.Visibility  = Visibility.Hidden;
                break;

            case "PuntiRosso":
            case "PuntiBlu":
                e.Column.CanUserSort = false;
                e.Column.Visibility  = Visibility.Visible;
                e.Column.CellStyle   = horizontalAlignment;
                break;

            default:
                e.Column.CanUserSort = false;
                e.Column.Visibility  = Visibility.Visible;
                break;
            }
        }
Esempio n. 7
0
 private void grid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "ExtensionData")
     {
         e.Column = null;
     }
     if (e.PropertyName == "idFuncionario")
     {
         e.Column = null;
     }
     if (e.PropertyName == "dataChamado")
     {
         (e.Column as DataGridTextColumn).Binding.StringFormat = "dd/MM/yyyy";
         e.Column.Header = "Data de Abertura";
     }
     if (e.PropertyName.StartsWith("descricao"))
     {
         e.Column.Header = "Descrição";
     }
     if (e.PropertyName.StartsWith("statusAtendimento"))
     {
         e.Column.Header = "Status do Atendimento";
     }
     if (e.PropertyName.StartsWith("nome"))
     {
         e.Column.Header = "Nome";
     }
 }
 void m_dataGridChamleon_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (column_num > (column_names.Length - 1)) { column_num = 0; }
     e.Column.Header = column_names[column_num];
     e.Column.Width = new DataGridLength(Convert.ToDouble(column_names[column_num + 1]), DataGridLengthUnitType.Pixel);
     column_num += 2;
 }
Esempio n. 9
0
 private void dataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     // プロパティ名をもとに自動生成する列をカスタマイズします
     switch (e.PropertyName)
     {
         case "Name":
             // Name列は最初に表示してヘッダーを名前にする
             e.Column.Header = "名前";
             e.Column.DisplayIndex = 0;
             break;
         case "Age":
             // Ageプロパティは1番目に表示してヘッダーを年齢にする
             e.Column.Header = "年齢";
             e.Column.DisplayIndex = 1;
             break;
         case "Gender":
             // Genderプロパティは表示しない
             e.Cancel = true;
             break;
         case "AuthMember":
             // AuthMemberプロパティは2番目に表示してヘッダーを承認済みにする
             e.Column.Header = "承認済み";
             e.Column.DisplayIndex = 2;
             break;
         default:
             throw new InvalidOperationException();
     }
 }
Esempio n. 10
0
 //this will make sure that the "ExtentionData" column added as part of Serialization is prevented from showing up on the grid.
 void grdData_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "ExtensionData")
     {
         e.Cancel = true;
     }
 }
Esempio n. 11
0
        void spisak(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
        {
            if (e.PropertyName == "Guid")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "Resursi")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "Oznaka")
            {
                e.Column.Header = "Oznaka";
            }

            if (e.PropertyName == "Boja")
            {
                e.Column.Header = "Boja";
            }

            if (e.PropertyName == "Opis")
            {
                e.Column.Header = "Opis";
            }
        }
Esempio n. 12
0
 void OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "Avatar")
     {
         e.Cancel = true;
     }
 }
Esempio n. 13
0
    public static void ApplyAutogeneratedColumnAttributes(DataGridAutoGeneratingColumnEventArgs e)
    {
      PropertyDescriptor pd = e.PropertyDescriptor as PropertyDescriptor;
      if (pd.Attributes[typeof(HiddenColumn)] != null)
      {
        e.Cancel = true;
        return;
      }

      DisplayNameAttribute nameAttribute = pd.Attributes[typeof(DisplayNameAttribute)] as DisplayNameAttribute;
      if (nameAttribute != null && !String.IsNullOrEmpty(nameAttribute.DisplayName))
      {
        e.Column.Header = nameAttribute.DisplayName;
      }

      ColumnWidth columnWidth = pd.Attributes[typeof(ColumnWidth)] as ColumnWidth;
      if (columnWidth != null)
      {
        e.Column.Width = columnWidth.Width;
      }

      if (e.PropertyType == typeof(double))
      {
        (e.Column as DataGridTextColumn).Binding.StringFormat = "{0:0.###}";
      }

			if (e.PropertyType == typeof(bool) && !e.Column.IsReadOnly)
			{
				var checkboxFactory = new FrameworkElementFactory(typeof(CheckBox));
				checkboxFactory.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Center);
				checkboxFactory.SetValue(FrameworkElement.VerticalAlignmentProperty, VerticalAlignment.Center);
				checkboxFactory.SetBinding(CheckBox.IsCheckedProperty, new Binding(e.PropertyName) { UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged });
				e.Column = new DataGridTemplateColumn { Header = e.Column.Header, CellTemplate = new DataTemplate { VisualTree = checkboxFactory }, SortMemberPath = e.Column.SortMemberPath };
			}
    }
Esempio n. 14
0
        protected override void OnAutoGeneratingColumn(DataGridAutoGeneratingColumnEventArgs e)
        {
            PropertyDescriptor desc = e.PropertyDescriptor as PropertyDescriptor;

            if (desc.IsEmpty())
            {
                return;
            }

            Attribute hide = desc.Attributes[typeof(ColumnHideAttribute)];
            if (hide != null)
            {
                e.Cancel = true;
                return;
            }

            DataGridTemplateColumnEx templateColumn = new DataGridTemplateColumnEx();
            templateColumn.CellTemplate = CreateDataTemplate(e);
            templateColumn.CellEditingTemplate = CreateEditDataTemplate(e);
            //templateColumn.SortMemberPath = "DueDate";

            e.Column = templateColumn;

            ColumnStyleAttribute header = desc.Attributes[typeof(ColumnStyleAttribute)] as ColumnStyleAttribute;
            if (!header.IsEmpty())
            {
                e.Column.Header = header.Header;
                e.Column.IsReadOnly = header.ReadOnly;
            }

            base.OnAutoGeneratingColumn(e);
        }
Esempio n. 15
0
 private void OnAutoGeneratingColumn(object send, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyType == typeof(DateTime))
     {
         (e.Column as System.Windows.Controls.DataGridTextColumn).Binding.StringFormat = "MM-dd-yyyy";
     }
 }
Esempio n. 16
0
 private void DataGrid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "ItemID")
     {
         e.Column.Visibility = Visibility.Collapsed;
     }
 }
Esempio n. 17
0
        static void DataGridConfig_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            if (e.PropertyDescriptor != null )
            {

                PropertyInfo propDisplayName = e.PropertyDescriptor.GetType().GetProperty("DisplayName");
                PropertyInfo propComponentType = e.PropertyDescriptor.GetType().GetProperty("ComponentType");
                Type componentType = propComponentType.GetValue(e.PropertyDescriptor) as Type;
                PropertyInfo propertyInfo = componentType.GetProperty(e.PropertyName);
                if (propertyInfo.GetGetMethod().IsVirtual)
                {
                    e.Cancel = true;
                }
                else
                {
                    if (propDisplayName != null)
                    {
                        Object objDisplayName = propDisplayName.GetValue(e.PropertyDescriptor);
                        if (objDisplayName != null)
                        { e.Column.Header = objDisplayName.ToString(); }
                    }
                }

            }
        }
Esempio n. 18
0
 private void dataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "IDProdotto")
     {
         e.Cancel = true;
     }
 }
Esempio n. 19
0
 void listofAll_ContractGeneratingColumns(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "Contract_number")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Mother_ID")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Hourly_payment")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Monthly_payment")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "introduce_meeting")
     {
         e.Column.Header = "Introduced";
     }
     if (e.PropertyName == "contract_signed")
     {
         e.Column.Header = "Signed";
     }
     if (e.PropertyName == "salary")
     {
         e.Column.Header = "Salary[₪]";
     }
     if (e.PropertyName == "distance")
     {
         e.Column.Header = "Distance[km]";
     }
 }
Esempio n. 20
0
 public static void SpaceOutNames(DataGridAutoGeneratingColumnEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "SongTitle":
             e.Column.Header = "Song Title";
             break;
         case "SongRating":
             e.Column.Header = "Song Rating";
             break;
         case "TrackLengthSeconds":
             e.Column.Header = "Track Length in Seconds";
             break;
         case "AlbumRating":
             e.Column.Header = "Album Rating";
             break;
         case "AlbumYear":
             e.Column.Header = "Album Year";
             break;
         case "TrackNumber":
             e.Column.Header = "Track Number";
             break;
         case "AlbumTitle":
             e.Column.Header = "Album";
             break;
         case "GenreName":
             e.Column.Header = "Genre";
             break;
     }
 }
 private void DataGrid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "RowKey" || e.Column.Header.ToString() == "PartitionKey" ||
         e.Column.Header.ToString() == "Timestamp" || e.Column.Header.ToString() == "ETag")
     {
         e.Column.Visibility = Visibility.Collapsed;
     }
 }
 private void dataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "Id") { e.Column.Header = "Azonosító"; e.Column.IsReadOnly = true; }
     if (e.Column.Header.ToString() == "Name") { e.Column.Header = "Megnevezés"; e.Column.Width = 150; }
     if (e.Column.Header.ToString() == "Quantity") { e.Column.Header = "Mennyiség"; }
     if (e.Column.Header.ToString() == "Unit") { e.Column.Header = "Egység"; }
     if (e.Column.Header.ToString() == "Status") e.Column.Visibility = Visibility.Hidden;
 }
Esempio n. 23
0
        /// <summary>
        /// Handles the OnAutoGeneratingColumn event of the DataGridPopularItems control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="DataGridAutoGeneratingColumnEventArgs"/> instance containing the event data.</param>
        private void DataGridPopularItems_OnAutoGeneratingColumn(object sender,
                                                                         DataGridAutoGeneratingColumnEventArgs e)
        {
            if ( e.PropertyName == "id" ) e.Cancel = true;

                        e.Column.MinWidth = e.Column.ActualWidth;
                        e.Column.Width = new DataGridLength(1, DataGridLengthUnitType.Star);
        }
Esempio n. 24
0
		private void dgReport_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) {
			var pd = e.PropertyDescriptor as PropertyDescriptor;
			var displayAttrib = pd.Attributes[typeof(DisplayAttribute)] as DisplayAttribute;

			if (displayAttrib != null) {
				e.Column.Header = ResReports.ResourceManager.GetString(displayAttrib.Name);
			}
		}
Esempio n. 25
0
 private void DataTable_OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     string displayName = GetPropertyDisplayName(e.PropertyDescriptor);
     if (!string.IsNullOrEmpty(displayName))
     {
         e.Column.Header = displayName;
     }
 }
 public static void dgPrimaryGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     var desc = e.PropertyDescriptor as PropertyDescriptor;
     var att = desc.Attributes[typeof(ColumnNameAttribute)] as ColumnNameAttribute;
     if (att != null)
     {
         e.Column.Header = att.Name;
     }
 }
 private void table_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyType == typeof (byte[]))
     {
         var column = e.Column as DataGridTextColumn;
         var binding = column.Binding as Binding;
         binding.Converter = new ByteArrayConverter();
     }
 }
Esempio n. 28
0
 private void OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     string displayName = ((PropertyDescriptor)e.PropertyDescriptor).DisplayName;
     if (!string.IsNullOrEmpty(displayName))
     {
         e.Column.Header = ((PropertyDescriptor)e.PropertyDescriptor).DisplayName;
     }
     //e.Column.Header = ((PropertyDescriptor)e.PropertyDescriptor).DisplayName;
 }
Esempio n. 29
0
 protected override void OnAutoGeneratingColumn(DataGridAutoGeneratingColumnEventArgs e)
 {
     e.Cancel = true;
     Columns.Add(new DataGridTemplateColumn
     {
         Header = e.Column.Header,
         CellTemplateSelector = CellTemplateSelector,
     });
 }
 private void Grid_AutoGeneratingColumn( object sender, DataGridAutoGeneratingColumnEventArgs e )
 {
     if ( e.PropertyType == typeof( double ) ) {
         DataGridTextColumn dataGridTextColumn = e.Column as DataGridTextColumn;
         if ( dataGridTextColumn != null ) {
             dataGridTextColumn.Binding.StringFormat = "{0:f3}";
         }
     }
 }
 private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     // only references are marked as objects, all other are strings
     _referenceColumnDetector.ProcessAutogeneratedColumn<object>(e
         , id =>
         {
             _model.DetailsById(id);
         });
 }
Esempio n. 32
0
 private void datagridFilm_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "idFilm")
     {
         e.Column.Visibility = Visibility.Hidden;
     }
     //sender
     if (e.Column.Header.ToString() == "paysFilm")
     {
     }
 }
Esempio n. 33
0
 public static void dataGridAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "ProgramName")
     {
         e.Column.Header = MyResourses.FirstTabTexts.ProgramName;
     }
     else if (e.PropertyName == "RunWhenOSstart")
     {
         e.Column.Header = MyResourses.FirstTabTexts.AutorunThisProgram;
     }
 }
Esempio n. 34
0
 private void FeaturesGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.Column.Header.ToString() == "Error" || e.Column.Header.ToString() == "HasErrors")
     {
         e.Cancel = true;
     }
     if (e.Column.Header.ToString() == "Explanation")
     {
         (e.Column as DataGridTextColumn).ElementStyle = FeaturesGrid.Resources["wrapText"] as Style;
     }
 }
Esempio n. 35
0
        //Here is where we add the custom styles for the columns
        private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            if (e.PropertyName == "Name")
            {
                DataGridTemplateColumn templateColumn = new DataGridTemplateColumn();
                templateColumn.Header = String.Empty;
                templateColumn.CellTemplate = (DataTemplate)Application.Current.Resources["headerCellTemplate"];

                e.Column = templateColumn;
            }
        }
 private void dataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     foreach (DataGridColumn col in dataGrid.Columns)
     {
         //only SyncAction should be modifiable, everything else should be process populated
         if (!col.Header.Equals("DefaultSyncAction"))
         {
             col.IsReadOnly = true;
         }
     }
 }
 private void DataGrid_OnAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "TotalReturn")
      {
     (e.Column as DataGridTextColumn).Binding.StringFormat = "P2";
      }
      if (e.PropertyName == "WinRatio")
      {
      (e.Column as DataGridTextColumn).Binding.StringFormat = "P2";
      }
 }
Esempio n. 38
0
 public static void SupressIdValues(DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "SongID" ||
         e.PropertyName == "GenreId" ||
         e.PropertyName == "AlbumId" ||
         e.PropertyName == "ArtistId" ||
         e.PropertyName == "SongArtistID")
     {
         e.Cancel = true;
     }
 }
Esempio n. 39
0
 private void dgAccountSummary_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyType == typeof(System.DateTime))
     {
         (e.Column as DataGridTextColumn).Binding.StringFormat = "d";
     }
     if (e.PropertyType == typeof(System.Decimal))
     {
         (e.Column as DataGridTextColumn).Binding.StringFormat = "c2";
     }
 }
Esempio n. 40
0
 void grid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     var pos = e.PropertyName.IndexOf("_");
     if (pos > 0 && e.Column.Header != null)
     {
         e.Column.Header = e.Column.Header.ToString().Replace("_", "__");
     }
     if (Properties.Settings.Default.ShowNullValuesAsNULL)
     {
         ((DataGridBoundColumn)e.Column).Binding.TargetNullValue = "NULL";
     }
 }
Esempio n. 41
0
 public static void AutoGeneratingColumnForDataGrid(object sender, DataGridAutoGeneratingColumnEventArgs e)
 {
     string headername = e.Column.Header.ToString();
     if (headername == "Word")
     {
         e.Column.Header = MyResourses.Texts.Word;
     }
     if (headername == "Count")
     {
         e.Column.Header = MyResourses.Texts.Count;
     }
 }
Esempio n. 42
0
        private void DG1_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
        {
            switch (e.Column.Header.ToString())
            {
            case "Id":
                e.Column.Visibility = Visibility.Collapsed;
                break;

            case "BirthDate":
                e.Column.IsReadOnly = true;
                DataGridTextColumn      dgtc = e.Column as DataGridTextColumn;
                DateTimeToDateConverter con  = new DateTimeToDateConverter();
                (dgtc.Binding as Binding).Converter = con;
                break;
            }
        }
 private void dgNamestaj_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if ((string)e.Column.Header == "Id")
     {
         e.Cancel = true;
     }
     if ((string)e.Column.Header == "Obrisan")
     {
         e.Cancel = true;
     }
     if ((string)e.Column.Header == "TipNamestajaId")
     {
         e.Cancel = true;
     }
     if ((string)e.Column.Header == "AkcijaId")
     {
         e.Cancel = true;
     }
 }
Esempio n. 44
0
 void listofAll_NannyGeneratingColumns(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "Daily_Working_hours")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Working_days")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Additional_Info")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Min_age")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Max_age")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "fideback")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Vacation_days")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Recommendations")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Birthdate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Hourly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Monthly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Possible_Hourly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "kidsCount")
     {
         e.Column.Header = "Number of Kids";
     }
     if (e.PropertyName == "elevatorExists")
     {
         e.Column.Header = "Elevator";
     }
     if (e.PropertyName == "PhoneNumber")
     {
         e.Column.Header = "Phone";
     }
     if (e.PropertyName == "Max_number_kids")
     {
         e.Column.Header = "Max. Count Kids";
     }
     if (e.PropertyName == "Floor")
     {
         e.Column.Width = 40;
     }
 }
Esempio n. 45
0
 private void DataGrid_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     FrameDataTable.ApplyAutogeneratedColumnAttributes(e);
 }
 void nannysoptiongrid_PriorityNannyGeneratingColumns(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     if (e.PropertyName == "Working_days" || e.PropertyName == "Daily_Working_hours" || e.PropertyName == "Vacation_days" || e.PropertyName == "Birthdate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "fideback")
     {
         e.Column.Header = "Feedback";
         e.Column.Width  = 60;
     }
     if (e.PropertyName == "Salary")
     {
         e.Column.Header = "Salary[₪]";
         e.Column.Width  = 60;
     }
     if (e.PropertyName == "Distance")
     {
         e.Column.Header = "Distance[km]";
         e.Column.Width  = 80;
     }
     if (e.PropertyName == "Hourly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Monthly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Recommendations")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Additional_Info")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Possible_Hourly_rate")
     {
         e.Cancel = true;
     }
     if (e.PropertyName == "Floor")
     {
         e.Column.Width = 40;
     }
     if (e.PropertyName == "elevatorExists")
     {
         e.Column.Header = "Elevator";
         e.Column.Width  = 60;
     }
     if (e.PropertyName == "PhoneNumber")
     {
         e.Column.Header = "Phone";
     }
     if (e.PropertyName == "Min_age")
     {
         e.Column.Header = "Minage[Month]";
     }
     if (e.PropertyName == "Max_age")
     {
         e.Column.Header = "Maxage[Month]";
     }
     if (e.PropertyName == "kidsCount")
     {
         e.Column.Header = "Class";
         e.Column.Width  = 40;
     }
     if (e.PropertyName == "Max_number_kids")
     {
         e.Column.Header = "Capacity";
         e.Column.Width  = 55;
     }
 }
 protected virtual new void OnAutoGeneratingColumn(DataGridAutoGeneratingColumnEventArgs e)
 {
 }
 private void dataGrid1_AutoGeneratingColumn(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
 {
     e.Column.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
 }
Esempio n. 49
0
        void spisak(object sender, System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs e)
        {
            if (e.PropertyName == "Guid")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "Etikete")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "TabelaEt")
            {
                e.Column.Header = "Etikete";
            }

            if (e.PropertyName == "Tip")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "TipOznaka")
            {
                e.Column.Header = "Tip";
            }

            if (e.PropertyName == "Ikonica")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "Oznaka")
            {
                e.Column.Header = "Oznaka";
            }

            if (e.PropertyName == "Opis")
            {
                e.Column.Header = "Opis";
            }

            if (e.PropertyName == "Ime")
            {
                e.Column.Header = "Ime";
            }

            if (e.PropertyName == "Datum")
            {
                e.Column.Header = "Datum otkrivanja";
            }

            if (e.PropertyName == "Eksploatacija")
            {
                e.Column.Header = "Moguća eksploatacija?";
            }

            if (e.PropertyName == "Vaznost")
            {
                e.Column.Header = "Od strateške važnosti?";
            }

            if (e.PropertyName == "Obnovljiv")
            {
                e.Column.Header = "Obnovljiv?";
            }

            if (e.PropertyName == "Mjera")
            {
                e.Column.Header = "Mjera";
            }

            if (e.PropertyName == "Pojavljivanje")
            {
                e.Column.Header = "Pojavljivanje";
            }

            if (e.PropertyName == "Cijena")
            {
                e.Column.Header = "Cijena";
            }

            if (e.PropertyName == "ImaSvojuIkonicu")
            {
                e.Cancel = true;
            }

            if (e.PropertyName == "Lokacija")
            {
                e.Cancel = true;
            }
        }