开发者

c# how can i view my datasource?

开发者 https://www.devze.com 2023-01-24 02:30 出处:网络
i am debugging a datagridview1.datasource how can i see the actual data that is stored inside datasour开发者_Python百科ce?I assume you don\'t know how to add the watch, so here\'s how.

i am debugging a datagridview1.datasource

how can i see the actual data that is stored inside datasour开发者_Python百科ce?


I assume you don't know how to add the watch, so here's how.

While the program is running go to the main window of Visual Studio and select Debug->Windows->Watch, this will open and select the watch window.

Just type dataGridView1.DataSource in there and it'll show all the values it holds

Since it's a dataset, you can type

((DataSet)dataGridView1.DataSource).Tables[0].Rows

Or use dataGridView1.DataMember instead of 0 if it gives you the wrong table..

But it's still hard to navigate through, you have to then go to Non-Public Members then List and then Results View but each row as a seperate ItemArray, so depending on what you're trying to see it can be a pain..

0

精彩评论

暂无评论...
验证码 换一张
取 消