burak Posted August 1, 2003 Posted August 1, 2003 Hello, I am using a checkboxlist control. I am having trouble with arranging the description of the checkboxes so that they line up left centered and couple of spaces away from the checkboxes. In the asp code, this is easy because the checkbox and the description are on separate columns. <td class="left"> <input name="task" type="checkbox" id="task"> </td> <td class="left"> rsData("tasks") </td> So we get a checkbox and left centered description that looks like this: � Teach courses pertaining to the chemical and physical properties and compositional changes of substances. ( the above description is left aligned, but may not show like that on the forum,) ( "physical" and "substances" fall right under "Teach ") In the .net code, the checkboxlist control is in one column, hence both the checkbox and the description show up in the same column. <td> <asp:checkboxlist id="Checkboxlist2" DataValueField="company_name" TextAlign="right" DataTextField="company_name" DataTextFormatString=" {0}" Runat="server"></asp:checkboxlist> </td> and we end up with � Teach courses pertaining to the chemical and physical properties and compositional changes of substances. which does not look good. I suspect the solution might have something to do with RenderBeginTag and RenderEndTag methods, but I am not sure. Do you know how I can create a custom checkboxlist control so that the text will appear like the asp version? Thank you, Burak Quote
*Experts* Bucky Posted August 1, 2003 *Experts* Posted August 1, 2003 One option might be this, to fake ASP.NET out and close the table data tag yourself to keep the checkbox in its own column. I'm not sure if or how well this will work, but try setting DataTextFormatString to "</td><td>{0}". Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.