decabooter
Programmer
I am a foxpro refugee and would like to know how to bind an array to a datagridview object. My goal is to provide users a way to enter and update the elements in an array.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
...
[COLOR=#008000]//POPULATE THE MANAGE REPORTS TAB[/color][COLOR=#000000]
currentReportsView.DataSource = _configuration.Reports;[/color]
...
...
[COLOR=#000000] [/color][COLOR=#0000FF]public[/color][COLOR=#000000] [/color][COLOR=#2B91AF]BindingList[/color][COLOR=#000000]<[/color][COLOR=#2B91AF]Report[/color][COLOR=#000000]> Reports
{
[/color][COLOR=#0000FF]get[/color][COLOR=#000000]
{
[/color][COLOR=#0000FF]return[/color][COLOR=#000000] _reports;
}
[/color][COLOR=#0000FF]set[/color][COLOR=#000000]
{
_reports = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
}
}[/color]
...
...
[COLOR=#000000] [[/color][COLOR=#2B91AF]Browsable[/color][COLOR=#000000]([/color][COLOR=#0000FF]false[/color][COLOR=#000000])]
[/color][COLOR=#0000FF]public[/color][COLOR=#000000] [/color][COLOR=#0000FF]int[/color][COLOR=#000000] ID
{
[/color][COLOR=#0000FF]get[/color][COLOR=#000000]
{
[/color][COLOR=#0000FF]return[/color][COLOR=#000000] _id;
}
[/color][COLOR=#0000FF]set[/color][COLOR=#000000]
{
_id = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
[/color][COLOR=#0000FF]base[/color][COLOR=#000000].Descendants([/color][COLOR=#A31515]"ID"[/color][COLOR=#000000]).FirstOrDefault().Value = [/color][COLOR=#0000FF]value[/color][COLOR=#000000].ToString();
}
}
[[/color][COLOR=#2B91AF]DisplayName[/color][COLOR=#000000]([/color][COLOR=#A31515]"Report Title"[/color][COLOR=#000000])]
[/color][COLOR=#0000FF]public[/color][COLOR=#000000] [/color][COLOR=#0000FF]string[/color][COLOR=#000000] ReportName
{
[/color][COLOR=#0000FF]get[/color][COLOR=#000000]
{
[/color][COLOR=#0000FF]return[/color][COLOR=#000000] _reportName;
}
[/color][COLOR=#0000FF]set[/color][COLOR=#000000]
{
_reportName = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
[/color][COLOR=#0000FF]base[/color][COLOR=#000000].Descendants([/color][COLOR=#A31515]"ReportName"[/color][COLOR=#000000]).FirstOrDefault().Value = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
}
}
[[/color][COLOR=#2B91AF]DisplayName[/color][COLOR=#000000]([/color][COLOR=#A31515]"Watch Folder"[/color][COLOR=#000000])]
[/color][COLOR=#0000FF]public[/color][COLOR=#000000] [/color][COLOR=#0000FF]string[/color][COLOR=#000000] Target
{
[/color][COLOR=#0000FF]get[/color][COLOR=#000000]
{
[/color][COLOR=#0000FF]return[/color][COLOR=#000000] _target;
}
[/color][COLOR=#0000FF]set[/color][COLOR=#000000]
{
_target = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
[/color][COLOR=#0000FF]base[/color][COLOR=#000000].Descendants([/color][COLOR=#A31515]"Target"[/color][COLOR=#000000]).FirstOrDefault().Value = [/color][COLOR=#0000FF]value[/color][COLOR=#000000];
}
}
...[/color]