Forum
 
 
Knowledge Base Forum
To post messages on the forum, you need to login first.
SearchForum Home
  Product Forums  smartDBforms.NET  Can't resize te...
 Can't resize text field
 
 5/10/2007 1:00:47 AM
Chris
3 posts


Can't resize text field

I have a SQLExpress database with a number of nText fields.  The data form builds without error and functions fine.  However, I cannot resize the text boxes.  Any ideas?

TIA,

Chris

 5/10/2007 12:29:16 PM
Adillis Support
27 posts
adillis.com


Re: Can't resize text field
Hi Chris,

You can do this with CSS. Open your page in Visual Studio in Source view. Put the following STYLE in the head section of your web page:
    <!--Put this inside the HEAD tag of the page-->
<style type="text/css">
.largetext textarea
{
width: 300px;
height: 300px;
}
</style>
After that set the CssClass property of the SmartDBControls which will handle ntext columns to largetext .

If you have any other questions, we will be more than happy to help you.

Best wishes,
Adillis Support
Adillis - IT solutions http://adillis.com

 5/11/2007 8:59:31 PM
Chris
3 posts


Re: Can't resize text field

Thanks for that advice.  The CSS style lets me set the dimensions in code.  I was hoping to be able to do that on the design surface using the resizing handles on the control (like you can with a Textbox).  Maybe in the next release?

Cheers,

Chris

 5/15/2007 11:38:53 AM
Adillis Support
27 posts
adillis.com


Re: Can't resize text field
Hi Chris,

There is one more way which will provide fine-grained control over the textarea.
SmartDBView supports ASP.NET 2 two-way databinding. You can put a standard TextBox and use two-way databinding. After that you will have full control over the TextBox in design-time. Here are the steps:
  1. Remove the SmartDBControl which handles the ntext field.
  2. At its place drag-and-drop a TextBox from the Standard Toolbox
  3. Change the TextMode property to MultiLine.
  4. Select the Edit DataBindings... command from the TextBox smart-tag panel
  5. Select the Text property and in the Bound to drop down select the ntext database field.
  6. Select the ReadOnly property and in the Custom binding field put the following expression: Container.IsReadOnlyMode

We have researched the possibility the nested textarea to get its size from its parent SmartDBControl but there is not a consistent solution( One that will work in Visual Studio Design time, Internet Explorer and Firefox).

If you have any other questions, we will be more than happy to help you.

Best wishes,
Adillis Support
Adillis - IT solutions http://adillis.com
 5/16/2007 1:30:29 AM
Chris
3 posts


Re: Can't resize text field

Thanks for letting me know about the textbox solution.

If I convert all of my large text fields to textboxes, what are the advantages in using SmartDBControl over a templated formview or detailsview control?

Cheers

Chris

  Product Forums  smartDBforms.NET  Can't resize te...
Copyright 2006-2008 Adillis Terms Of Use Feedback Contact Us