Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

I am using this nuget UiPathTeam.WpfFormCreator.Activities, through which we could show a xaml form for user input by an attended robot. I managed to correctly work through types (Text,Image,Date,...) to populate controls like TextBoxes, DatePicker, etc following the below link https://github.com/RaduPantelimon/UiPathActivities/blob/master/WpfFormCreator/XamlFormCreator.docx .Now I also need to populate a DataGrid passing a DataTable.I have done this much, but Stuck on the point where we specify the type for the DataTable. For String it is "Text", DateTime it is "Value".So far I have tried (DataTable,List,Array..) But I am getting the below error.

Screenshot of the error:

enter image description here

This is my Return Dictionary

New Dictionary( Of String, Dictionary( Of String, Object))  From { 

{ "Table", New Dictionary( Of String, Object) From { { "DataTable",InvoiceDT 

} } }}

1 Answer

0 votes
by (29.5k points)

Try making the following change to your dictionary:

 

New Dictionary( Of String, Dictionary( Of String, Object))  From {
{ "Table", New Dictionary( Of String, Object) From { { "DataContext", InvoiceDT } } }}

The change here is instead of datatable we are  using datacontext  as the type for passing datatable

31k questions

32.4k answers

500 comments

693 users

Browse Categories

...