 <p>Unfortunately for your case, I don't think this is possible to do <em>before</em> a bind like that. Here is another question on the subject: <a href="http://stackoverflow.com/questions/1379125/make-drop-down-list-item-unselectable">make drop down list item unselectable</a></p> <p><strong>Update:</strong></p> <p>I'm editing my answer based on Derrick's answer and your comment about it. Derrick is suggesting that <em>after</em> the dropdownlist is bound, then go through and disable the separators. So it would look something more like this:</p> <pre><code>protected void gvCategory_DataBound(object sender, EventArgs e) { foreach (ListItem li in gvCategory.Items) { if(li.Text.Contains("--")) li.Attributes.Add("disabled", "true"); } } </code></pre> <p><strong>Update 2:</strong></p> <p>Add the OnDataBound event to manipulate the DropDownList after it is bound.</p> <pre><code>&lt;asp:DropDownList ID="gvCategory" runat="server" OnDataBound="gvCategory_DataBound"&gt;&lt;/asp:DropDownList&gt; </code></pre>