I have a radgrid in which I create a table and assign it to the Controls for an item in the Itemdatabound event as below.
I want to filter the PayoutType column based on a given list (ex , Retirement, Termination, Withdrawal). The table cell can any number of these values for one row. But since it is not bound to a database column I am unable to filter it.
Could you tell me how I can fiter in this scenario?
I want to filter the PayoutType column based on a given list (ex , Retirement, Termination, Withdrawal). The table cell can any number of these values for one row. But since it is not bound to a database column I am unable to filter it.
Could you tell me how I can fiter in this scenario?
protected void rgPayoutElections_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem item = e.Item as GridDataItem; int accountID = Int32.Parse(item.GetDataKeyValue("AccountID").ToString()); DataRow[] dr = PayoutElection.GetPayouts_ByAccount_ListByParticipant(Int32.Parse(Profile.ParticipantID), accountID); Table tblPayoutType = new Table(); foreach (DataRow row in dr) { TableRow trPayoutType = new TableRow(); TableCell cellPayoutType = new TableCell(); cellPayoutType.Text = row["PayoutType"].ToString(); cellPayoutType.CssClass = "textRed"; trPayoutType.Cells.Add(cellPayoutType); tblPayoutType.Rows.Add(trPayoutType); } item["PayoutType"].Controls.Add(tblPayoutType); } }