System.Web.UI.WebControls.TreeView.SetCheckStates C# (CSharp) Method

SetCheckStates() private method

private SetCheckStates ( NameValueCollection states ) : void
states NameValueCollection
return void
		void SetCheckStates (NameValueCollection states)
		{
			if (states == null)
				return;

			string keyPrefix = ClientID + "_cs_";
			foreach (string key in states) {
				if (key.StartsWith (keyPrefix, StringComparison.Ordinal)) {
					string id = key.Substring (keyPrefix.Length);
					TreeNode node = FindNodeByPos (id);
					if (node != null && !node.Checked)
						node.Checked = true;
				}
			}
		}