I'm playing around with DataGrids and the Edit columns ability.
I have a text area that can be anywhere from 1-8000 characters.
When I add the edit capabilities to this DataGrid it displays a single line
TextBox.
Is there anyway of getting this textbox to be multi line, and only 450
characters wide?
I've gotten the width using CSS, but can't fingure out how to make it a
"textarea"
Thanks!
/RT 2 1154
Hi Ryan,
Are you using a template column? You should be able to configure a multiline
textbox inside that. You can said the character width using the Columns
attribute. Here's the idea:
<asp:templateco lumn>
<itemtemplate >
<asp:Label id="Label1" runat="server" Text='<%#
DataBinder.Eval (Container, "DataItem.strin gvalue") %>'>
</asp:label>
</itemtemplate>
<edititemtempla te>
<asp:TextBox id="TextBox1" runat="server"
Text='<%# DataBinder.Eval (Container, "DataItem.strin gvalue") %>'
TextMode="Multi Line" Height="55px" Columns="450">
</asp:textbox>
</edititemtemplat e>
</asp:templatecol umn>
Ken
Microsoft MVP [ASP.NET]
"Ryan Ternier" <rt******@icomp asstech.com> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . I'm playing around with DataGrids and the Edit columns ability.
I have a text area that can be anywhere from 1-8000 characters.
When I add the edit capabilities to this DataGrid it displays a single line TextBox.
Is there anyway of getting this textbox to be multi line, and only 450 characters wide?
I've gotten the width using CSS, but can't fingure out how to make it a "textarea"
Thanks!
/RT
Thanks Ken!
That worked very well... however, whenever i try to update that field, I
can't find the actual textbox that contains the new data.
in the Cell that contains the Description (what I need the multiline for),
there are 3 controls. 0 being literal, 1 textbox, 2 literal.
I've also tried:
txtDescription = e.Item.FindCont rol("txtDescrip tion")
And that still yeields the original textbox without the modifications I
made.
Any suggestions?
"Ken Cox [Microsoft MVP]" <BA************ @sympatico.ca> wrote in message
news:u6******** ******@TK2MSFTN GP15.phx.gbl... Hi Ryan,
Are you using a template column? You should be able to configure a
multiline textbox inside that. You can said the character width using the Columns attribute. Here's the idea:
<asp:templateco lumn> <itemtemplate > <asp:Label id="Label1" runat="server"
Text='<%# DataBinder.Eval (Container, "DataItem.strin gvalue") %>'> </asp:label> </itemtemplate> <edititemtempla te> <asp:TextBox id="TextBox1" runat="server" Text='<%# DataBinder.Eval (Container, "DataItem.strin gvalue") %>' TextMode="Multi Line" Height="55px" Columns="450"> </asp:textbox> </edititemtemplat e> </asp:templatecol umn>
Ken Microsoft MVP [ASP.NET]
"Ryan Ternier" <rt******@icomp asstech.com> wrote in message news:%2******** *******@TK2MSFT NGP09.phx.gbl.. . I'm playing around with DataGrids and the Edit columns ability.
I have a text area that can be anywhere from 1-8000 characters.
When I add the edit capabilities to this DataGrid it displays a single line TextBox.
Is there anyway of getting this textbox to be multi line, and only 450 characters wide?
I've gotten the width using CSS, but can't fingure out how to make it a "textarea"
Thanks!
/RT
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: pmud |
last post by:
Hi,
I have 4 columns in my sql database table. I added a data adapter , data set
& a data grid to view this information. But the data grid is displaying those
4 columns TWICE , i.e in the data grid i see 8 columns.
In case this is useful, the primary key is Serial no. which is an identity
....i.e everytime a row is added to the database, it increments by1. Also,
when i configured the data adapter, it couldnt Generate the UPDATE &...
|
by: jijo kuruvila |
last post by:
actually my code looks like this
private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.Columns.Visible=true;
DataGrid1.Columns.Visible=true;
TextBox t1=new TextBox();
TextBox t6=new TextBox();
TextBox t7=new TextBox();
|
by: Josef Meile |
last post by:
Hi,
I'm using a ComboBox, some Textboxes, and a DataGrid to represent a
many-to-many relationship between Person and Course. Each time that I change
the value in the ComboBox (which for now is the OID of Person), the
information of the person matching the selected OID is shown in the Textboxes
(Name, Address, id, etc) and the courses this person is taken are shown in a
DataGrid (course name, price, etc.). This is working well so far, I...
|
by: Joe Au |
last post by:
I follow the Walkthrough documented on Visual Studio to create an editable
data grid but it does not work on getting the value of the textbox in the
data grid. The code is copied here. I mark "*****" at which the categoryName
always get the past value no matter what it has been changed. How do I fix
it? Thanks.
Joe.
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As...
|
by: pmud |
last post by:
Hi,
I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of columns. & depending on what the user
enters, the data grid can grow very large. So to avoid scrolling the whole
page, I just want the data grid to be scrollable. For this I used the <div>
tags around the data grid,
<div...
| |
by: tshad |
last post by:
Is there a way to carry data that I have already read from the datagrid from
page to page?
I am looking at my Datagrid that I page through and when the user says get
the next page, I have to go to the database to get the next page. Is there
a way to use the dataset to allow us to read back and forth in it instead of
going back to the database to get it?
Thanks,
|
by: Tejpal Garhwal |
last post by:
I have datagrid filled with some data rows. At the run time i want know how
many total rows are there in the data grid ?
Any idea ? Any Suggestions ?
Thanks in advance
Tej
|
by: Anil Gupte |
last post by:
After reading a tutorial and fiddling, I finally got this to work. I can
now put two tables created with a DataTable class into a DataRelation.
Phew! And it works!
Dim tblSliceInfo As New DataTable("SliceInfo")
Dim tblSliceRatings As New DataTable("SliceRatings")
'.... All the adding datacolumns, datarows, etc. goes here..
DatasetInit.Tables.Add(tblSliceInfo)
|
by: RolfHerbert |
last post by:
Hi all,
Source code below. I am using an sqldatasorce to populate a datagrid.
I am using datakeyIds.
I am interested in two keys which I have added to the datakeyids,
however if either of the keys is not databound, set to visible=false
or readonly=true, they are unavailable as parameters in my update
statement.
|
by: insirawali |
last post by:
Hi all,
I have this problem, i need to know is there a way i cn use the data
adapter's update method in this scenario.
i have 3 tables as below
create table table1{
id1 int identity(1,1)
Constraint pk_table1 Primary Key,
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |