Monday, April 16, 2012

how to set gridview dropdown selectedindex using datakey on page_Load event




if (grdInvoices.DataKeys[e.Row.RowIndex].Values[3].ToString() != "")
                {
                    ddl.Items.FindByText(grdInvoices.DataKeys[e.Row.RowIndex].Values[3].ToString()).Selected = true;
                }

No comments:

Post a Comment