开发者

Is there a 'RadLabel' from Telerik?

I use the "Label" attribute in Telerik quite frequently. I like it because it helps me consistently structure tables. An example:

<ul class="box">
    <li><telerik:RadTextBox runat="server" Label="Name:"
           LabelCssClass="label" Enabled="false" Width="100%" /></li>
    <li><telerik:RadTextBox runat="server" ID="MachineSize" Label="Password:"
           LabelCssClass="label" Width="100%" /></li>
</ul>

I've run into a problem. I would like to continue with the above layout/structure, but in some cases I have tables that simply dump output (ie no user input). To be consistent, I need a RadLabel, which takes an input of "Label" and "Text", and then aligns them appropriately开发者_开发问答 in the overall table format. Is there such a thing?


I was just wondering... What about using the RadTextBox and just setting Enabled to 'false'? It kind of works, except that the text is now grayed out. How can I cleanly use the RadTextBox, just tweaking it to not show a border and not accept user input (and also not gray out the text)?


No it doesn't, but you can create your own Label usercontrol that implements the System.Web.UI.WebControls.Label class, and has it's own properties.

You can create a 'Label' property in it that maps to the Text Property of System.Web.UI.WebControls.Label.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜