The DataItem property is available only during databinding in the ItemDataBound event:
| C# |
Copy Code |
|
protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e) { DataRowView dataSourceRow = (DataRowView)e.Item.DataItem; } |
| VB.NET |
Copy Code |
|
Protected Sub RadMenu1_ItemDataBound(sender As Object, e As Telerik.WebControls.RadMenuEventArgs) Dim dataSourceRow As DataRowView = CType(e.Item.DataItem, DataRowView) End Sub
|
You should not use it elsewhere. You can use the Value property or Custom Attributes instead.