protected void dgvCategory_RowDataBound(object sender, GridViewRowEventArgs e) { DataControlRowType itemType = e.Row.RowType; switch (itemType) { case DataControlRowType.DataRow: string strID = dgvCategory.DataKeys[e.Row.RowIndex].Values[0].ToString(); Label lbl = (Label)e.Row.FindControl("lblCategory"); tblSubCategory objSubCategory = new tblSubCategory(); objCommon = new clsCommon(); lbl.Text = ": " + objCommon.JoinWithComma(objSubCategory.GetAllSubCategoryProductWise(hdnPKID.Value, strID), tblSubCategory.ColumnNames.AppSubCategory, Enums.Enum_DataType.sString); objCommon = null; objSubCategory = null; break; } }