Domanda

I would like to get the column (Description) from DataRowView.I have the following code.

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
        {

            if (e.Row.DataItem != null)
            {
                DataRowView dataRowView = ???????????
                string description = dataRowView["Description"] as string;
            }

        }

How to replace ?????????? with appropriate code?

È stato utile?

Soluzione

Use (DataRowView)e.Row.DataItem;

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top