I have a scenario where I need to conditionally slide up (or hide) sets of controls/elements. I like the answer I found here from QBM5 about assigning data-groups to the controls that may be slid up (pardon my grammar) like so:
<input data-group="1" type="text" />
...but again, I am creating these controls via C#, not pure/straight HTML, so I need to add that data-group property to it somehow programmatically. But this attempt to do so with a TextBox (input, type=text):
boxRequesterName = new TextBox
{
CssClass = "finaff-webform-field-input"
};
boxRequesterName.DataGroup = 1; // Nice try, but there is no such property as "DataGroup"
cellTxtbx_1.Controls.Add(boxRequesterName);
dynamicTable.Rows.Add(row1);
...won't work, because there is no "DataGroup" property on the TextBox.
What can I do to add the equivalent of data-group="1" to my control?