public void SetData(ref DataRow row) { try { if (row == null) { return; } if (this.ultraDataSource1.Rows.Count == 0) { CommonMethod.InitUserControl(ref ultraDataSource1, ref ultraGrid1); } CommonMethod.ResetUltraDataSource(ref ultraDataSource1, ref ultraGrid1); for (int i = 0; i < ultraDataSource1.Band.Columns.Count; i++) { try { if (row.Table.Columns.Contains(ultraDataSource1.Band.Columns[i].Key)) { ultraDataSource1.Rows[0][i] = row[ultraDataSource1.Band.Columns[i].Key]; } } catch { } } } catch { } }