With the tip from the post How to bind Generic Dictionary with dropdown list I've created the static method:
//'http://blogs.msdn.com/piyush/archive/2006/10/17/how-to-bind-generic-dictionary-with-dropdown-list.aspx
public static void ControlBinding(ListControl ctrl, Dictionary<string, string> dict)
{
ctrl.DataSource = dict;
ctrl.DataValueField = "Key";
ctrl.DataTextField= "Value";
}
//Overload for StringDictionary
public static void ControlBinding(ListControl ctrl, StringDictionary dict)
{
ctrl.DataSource = dict;
ctrl.DataValueField = "Key";
ctrl.DataTextField = "Value";
}
Hopefully, it would help someone.
Similar method for table:
public static void ControlBinding(ListControl ctrl, DataTable tbl,string valueField, string textField)
{
ctrl.DataSource = tbl;
ctrl.DataValueField = valueField;
ctrl.DataTextField = textField;
}