Monday, 20 March 2017

Set Selected checkboxlist in c#

/// Codebehind

if (MemberInformationDt.Rows[0]["GovtScheme"].ToString() != "")
        {
            string GovtScheme = MemberInformationDt.Rows[0]["GovtScheme"].ToString();   
            for (int j = 0; j < chkGovtScheme.Items.Count; j++)
            {
                DataRowView dv = chkGovtScheme.Items[j] as DataRowView;
                int vv = (int)dv["SchemeID"];
                if (GovtScheme.Contains(vv.ToString()))
                {
                    chkGovtScheme.SetItemChecked(j, true);
                }
            }

        }



No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...