How should I go about setting the height of freetextbox? I want to size the textbox reasonably based on the lenght of the text in the textbox.
simply set the height property of textbox as much you want... like..
<FTB:FreeTextBox ID="txtDesc" runat="server" Width="590px" Height="300px" ></FTB:FreeTextBox>
Related
Using Telerik RadComboBox for asp.net. Having trouble setting the width of the control. No matter what I change the width do it doesn't have any effect....
<telerik:RadComboBox RenderMode="Classic" Skin="Default"
EnableBrowserButtonStyle="true"
ID="ddlSelectedItems" runat="server" CheckBoxes="true"
EnableCheckAllItemsCheckBox="true"
Width="245px" Label="" />
Any suggestions?
Unfortunately, the RadComboBox always sets its width to 100%, no matter what you set the Width property to. The only way I could find to work around this is to wrap the control in a tag with a display attribute of either block or inline-block, and put the width style on the wrapper (or use a class to apply the width).
<div style="width: 245px;">
<telerik:RadComboBox RenderMode="Classic" Skin="Default"
EnableBrowserButtonStyle="true"
ID="ddlSelectedItems" runat="server" CheckBoxes="true"
EnableCheckAllItemsCheckBox="true"
Label="" />
</div>
Can you set the RenderMode property to Lightweight and test again:
This works on my side.
I have a div area like the following in my .aspx program.
<div id="valueIntroduction" type="text" class="labelarea" runat="server">
</div>
<div class="line"></div>
<asp:Button ID="editButton" runat="server" Text="Edit" />
Currently the div valueIntroduction is getting data from database. I have a Edit button in my program. When i press Edit button I am trying to change the div to text box.
Try this..
1.Add a textbox and make visible="false"
2.when clicking edit button copy the div's contents to the textbox and make div invisible by using visibility:"hidden".
3.Set the textbox visibility to true.
Try putting an invisible textbox below your div, then when you click the edit button, transfer the contents of the div into the textbox, make the textbox visible and the div invisible.
I am using DataList control in ASP.net application. I have set
DataList1.RepeatColumns = 3;
DataList1.RepeatDirection = RepeatDirection.Horizontal;
properties of DataList. When item count is more than 3 it shows up properly. However if it is less than 3 it distorts and occupies whole space.
e.g. if there is only 1 item, it takes complete width and distorts UI.
if $$$ is one item, for 3 it shows like,
$$$|$$$|$$$
for one item it shows like
$$$$$$$$$$$
and UI disturbs completely.
Is there any way to format display in proper manner?
As lcarus mentionned, try setting ItemStyle-Width property. Here is a snippet which worked for me:
<asp:DataList ID="myDataList" runat="server" RepeatColumns="3" HorizontalAlign="Center" RepeatLayout="Table" RepeatDirection="Horizontal">
<ItemStyle Width="33%" />
<ItemTemplate>
<your code here>
</ItemTemplate>
</asp:DataList>
When requiring 3 columns, set the column width to 33%.
Try setting the ItemStyle-Width property to the desired width. I would expect it to set the width of each item to the exact size you set it to: Here's a link to MSDN documentation: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.itemstyle.aspx
I have a validator that has the associated error text set as below.
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="1" ControlToValidate="EmailTB"
Text="<div class='error-left'></div><div class='error-inner'>required</div>"
Display="Static" Width="100%" runat="server" SetFocusOnError="true" />
I put this validator on the third td of a tr. Th first two td are the name of the field and a textbox. The problem is that even if the error text is not shown, it seams to dstort the whole table layout by having width and height. I understand that ASP>NET uses javascript to make the text inside visible when the error text should be shown, but I don't like the fact that the layout is distorted by the height of a label which should not be activated. Look in the photo bellow:
Observations:
- This is the only validator in the form, this is why the tr for the email is so high (as the error-left class has this height)
Change the Display property to Dynamic - which will have the style set to "display: none;" until it's triggered.
Instead of including code even when there is no error, make it include code only if there is an error.
I have a GridView with an ImageField and a ButtonField in it.
The Image is large .. but i want it to be displayed in a smaller size in the grid.. so I'm looking for a way to fix the cell size of my GridView.
How can I do this?
I had the same problem; solved it this way:
<asp:ButtonField ButtonType="Image" CommandName="EliminarFuente" HeaderText="Eliminar" ImageUrl="~/Themes/Images/Delete.png" >
<ControlStyle CssClass="BotonDeImagen"/>
<ItemStyle HorizontalAlign="Center" />
</asp:ButtonField>
The CSS class is like this:
.BotonDeImagen
{
width:25px;
height:25px;
}
and the result is a centered image of 25*25 pixels.
Alternative solution:
You could define height and width on the ControlStyle tag, instead of using a CSS class.
You can make set HighQualityBicubic InterpolationMode when you do the BinaryWrite
Checkout this example code.
Try using these two properties on your ImageField.
ItemStyle-Width=""
ItemStyle-Height=""
Explicity set the height and width of the image. Use CSS to control the size of the rendered tags.