I am in the process of replacing old Component One data tools with out of the box funtionality. Now I've come across a method which uses C1.Data.SimpleTableRow
and I can't find any equivalent method to replace the functionality. The method in question looks similar to this:
protected void dl_languages_ItemDataBound(object sender, DataListItemEventArgs e)
{
C1.Data.SimpleTableRow lang = (C1.Data.SimpleTableRow)e.Item.DataItem;
C1.Data.C1DataRow row = C1WebDataSet_lookup.TableViews["LANGUAGE"].Rows.Find(new object[] { lang.DataRow.ItemArray[1].ToString() });
int Index = lang.DataRow.Ordinal;
Index++;
//... further processing
}
My first thought was to replace it with the TableRow class, but TableRow has no DataRow property. Since I can't find any documentation to SimpleTableRow I am at a total loss here.
How would I need to refactor this snippet, so I do not have to use the C1 assembly here?
I'm not familiar with componentone-controls but try to cast e.Item.DataItem
to DataRowView
:
protected void dl_languages_ItemDataBound(object sender, DataListItemEventArgs e)
{
DataRowView rowView = (DataRowView) e.Item.DataItem;
DataRow row = rowView.Row;
//... further processing
}