当前位置: 首页>>代码示例>>C#>>正文


C# DataGridRow.GetIndex方法代码示例

本文整理汇总了C#中System.Windows.Controls.DataGridRow.GetIndex方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridRow.GetIndex方法的具体用法?C# DataGridRow.GetIndex怎么用?C# DataGridRow.GetIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.DataGridRow的用法示例。


在下文中一共展示了DataGridRow.GetIndex方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetIndexpasien

 private string GetIndexpasien(DataGridRow row)
 {
     DataRowView v = (DataRowView)dgTerapi.Items[row.GetIndex()];
     return (string)v[0].ToString();
 }
开发者ID:junkiesdevstudio,项目名称:MYDENTIST,代码行数:5,代码来源:FormTerapi.xaml.cs

示例2: _buildRowHeader

    private void _buildRowHeader(DataGridRow row) {
      if (this._owner != null) {
        if ((this.HeadersVisibility & DataGridHeadersVisibility.Row) == DataGridHeadersVisibility.Row) {
          var rowIndex = row.GetIndex();
          Int64 startRow = 0;
          if (this._owner.PageSize > 0)
            startRow = (this._owner.PageCurrent - 1) * this._owner.PageSize;
          var maxRownum = "" + (startRow + ((this._owner.PageSize > 0) ? this._owner.PageSize : this._owner.DS.Count()));
          var maxRownumLen = maxRownum.Length;
          var numFmt = new String('0', maxRownumLen);
// ReSharper disable FormatStringProblem
          var rnum = String.Format("{0:" + numFmt + "} ", startRow + rowIndex + 1);
// ReSharper restore FormatStringProblem
          if (!this._owner.SuppressMultiselection && this._owner.Multiselection) {
            var v_hpan = new StackPanel();
            v_hpan.HorizontalAlignment = HorizontalAlignment.Right;
            v_hpan.Orientation = Orientation.Horizontal;
            v_hpan.FlowDirection = FlowDirection.LeftToRight;

            var v_htxt = new TextBlock();
            v_htxt.Text = rnum;
            v_hpan.Children.Add(v_htxt);

            var rowData = (CRTObject)row.DataContext;
            var v_hcbx = new CheckBox();
            var v_is_selected = this._owner.Selection.CheckSelected(rowData);
            if (this._owner.Selection.Inversion)
              v_hcbx.IsChecked = !v_is_selected;
            else
              v_hcbx.IsChecked = v_is_selected;

            v_hpan.Children.Add(v_hcbx);
            v_hcbx.Checked += (s1, e1) => this._doOnRowCheckedChanged(rowData, true);
            v_hcbx.Unchecked += (s1, e1) => this._doOnRowCheckedChanged(rowData, false);
            rowData.ExtObject = v_hcbx;
            row.Header = v_hpan;
          } else
            row.Header = rnum;



          //}
        }
      }
    }
开发者ID:tormoz70,项目名称:Bio.Framework.8,代码行数:45,代码来源:CDataGrid.cs

示例3: GetIndexObat

 private string GetIndexObat(DataGridRow row)
 {
     DataRowView v = (DataRowView)dgObat.Items[row.GetIndex()];
     return (string)v[0].ToString();
 }
开发者ID:junkiesdevstudio,项目名称:MYDENTIST,代码行数:5,代码来源:FormObat.xaml.cs

示例4: UpdateRow

        /// <summary>
        /// Updates the specified row.
        /// </summary>
        /// <param name="row">DataGridRow</param>
        private void UpdateRow(DataGridRow row)
        {
            BugTraceObject loadingItem = (BugTraceObject)row.DataContext;
            BugTraceObject selectedItem = null;
            string selectedHeader = null;

            if (this.BugTraceView.CurrentCell != null &&
                this.BugTraceView.CurrentCell.Item is BugTraceObject)
            {
                selectedItem = (BugTraceObject)this.BugTraceView.CurrentCell.Item;
                selectedHeader = (string)this.BugTraceView.CurrentCell.Column.Header;
            }

            if (this.SearchTextBox.Text.Length > 0 &&
                this.SearchQueryCache.ContainsKey(this.SearchTextBox.Text))
            {
                int rowId = row.GetIndex();
                if (this.SearchQueryCache[this.SearchTextBox.Text].Contains(rowId))
                {
                    this.RestoreRow(row);
                }
                else
                {
                    this.FadeRow(row);
                }
            }
            else if (selectedItem != null && selectedHeader != null &&
                ((selectedHeader.Equals("Type") &&
                !loadingItem.Type.Equals(selectedItem.Type)) ||
                (selectedHeader.Equals("Machine") &&
                !loadingItem.Machine.Equals(selectedItem.Machine)) ||
                (selectedHeader.Equals("State") &&
                !loadingItem.MachineState.Equals(selectedItem.MachineState)) ||
                (selectedHeader.Equals("Action") &&
                !loadingItem.Action.Equals(selectedItem.Action)) ||
                (selectedHeader.Equals("Target Machine") &&
                !loadingItem.TargetMachine.Equals(selectedItem.TargetMachine))))
            {
                if (this.IsTraceViewCollapsed)
                {
                    this.CollapseRow(row);
                }
                else
                {
                    this.FadeRow(row);
                }
            }
            else
            {
                this.RestoreRow(row);
            }
        }
开发者ID:yonglehou,项目名称:PSharp,代码行数:56,代码来源:TraceWindow.xaml.cs

示例5: _buildRowHeader

    private void _buildRowHeader(DataGridRow row) {
      if (this._owner != null) {
        if ((this.HeadersVisibility & DataGridHeadersVisibility.Row) == DataGridHeadersVisibility.Row) {
          //if (row.Header == null) {
            Int32 v_row_index = row.GetIndex();
            Int64 v_start_row = 0;
            if (this._owner._jsClient.pageSize > 0) 
              v_start_row = (this._owner._jsClient.pageCurrent - 1) * this._owner._jsClient.pageSize;
            String v_max_rownum = "" + (v_start_row + ((this._owner._jsClient.pageSize > 0) ? this._owner._jsClient.pageSize : this._owner._jsClient.DS.Count()));
            var v_max_rownum_len = v_max_rownum.Length;
            String v_num_fmt = new String('0', v_max_rownum_len);
            String v_rnum = String.Format("{0:" + v_num_fmt + "} ", v_start_row + v_row_index + 1);
            if (this._owner._jsClient.jsMetadata.multiselection) {
              var v_hpan = new StackPanel();
              v_hpan.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
              v_hpan.Orientation = Orientation.Horizontal;
              v_hpan.FlowDirection = System.Windows.FlowDirection.LeftToRight;

              var v_htxt = new TextBlock();
              v_htxt.Text = v_rnum;
              v_hpan.Children.Add(v_htxt);

              var v_row_data = row.DataContext as CRTObject;
              var v_hcbx = new CheckBox();
              var v_is_selected = this._owner._multiselection.CheckSelected(v_row_data);
              if (this._owner._multiselection.Inversion)
                v_hcbx.IsChecked = !v_is_selected;
              else
                v_hcbx.IsChecked = v_is_selected;

              v_hpan.Children.Add(v_hcbx);
              v_hcbx.Checked += new RoutedEventHandler((s1, e1) => {
                this._doOnRowCheckedChanged(v_row_data, true);
              });
              v_hcbx.Unchecked += new RoutedEventHandler((s1, e1) => {
                this._doOnRowCheckedChanged(v_row_data, false);
              });
              v_row_data.ExtObject = v_hcbx;
              row.Header = v_hpan;
            } else
              row.Header = v_rnum;



          //}
        }
      }
    }
开发者ID:tormoz70,项目名称:Bio.Framework.8,代码行数:48,代码来源:CDataGrid.cs

示例6: GetIndexKaryawan

 //@Bahar : Ambil ID Karyawan dari DataGrid yang diselect
 private string GetIndexKaryawan(DataGridRow row)
 {
     DataRowView v = (DataRowView)dgUsers.Items[row.GetIndex()];
     return (string)v[0].ToString();
 }
开发者ID:junkiesdevstudio,项目名称:MYDENTIST,代码行数:6,代码来源:FormKaryawan.xaml.cs


注:本文中的System.Windows.Controls.DataGridRow.GetIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。