Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k 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.8k 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

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...