XtraGrid从表刷新问题
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
List<Test> tests = new List<Test>() { new Test() { ID = 1, test = new List<Test1>() { new Test1() { Value = 2 } } } };
gridControl1.DataSource = tests;
}
private void timer1_Tick(object sender, EventArgs e)
{
Test test = gridView1.GetFocusedRow() as Test;
if (test != null)
{
test.ID += 11;
test.test.First().Value += 1;
}
gridView1.RefreshData();
}
}
public class Test
{
public int ID { get; set; }
//
public List<Test1> test { get; set; }
}
public class Test1
{
public int Value { get; set; }
}
}
//主表的数据界面会刷新,但是子表数据改了但是界面不自动刷新,各种刷新都试了,刷新不了,求解决。。。。。。。。。。。。。。。。急
页:
[1]