473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to change text direction of text box with asp.net datagrid control

dear all i want to change text direction of text box with in datagrid
control i am writting following code but it is not working.

public void SetUpClientScript(object sender, DataGridItemEventArgs e)
{
//when item type is footer
if(e.Item.ItemType == ListItemType.Footer)
{
TextBox addStateNo_TextBox =
(TextBox)e.Item.FindControl("addStateNo_TextBox");
addStateNo_TextBox.Attributes.Add("rtl","<style>in put{direction:rtl}</style>");

}
//when item type is edit item
if(e.Item.ItemType==ListItemType.EditItem)
{
TextBox editStateNo_TextBox =
(TextBox)e.Item.FindControl("editStateNo_TextBox") ;
editStateNo_TextBox.Attributes.Add("rtl","<style>i nput{direction:rtl}</style>");
}
}

can any tell me what is the problem with in it.

Aug 2 '06 #1
1 4170
try addStateNo_TextBox.Attributes.Add("style", "direction:rtl")

"Santosh" wrote:
dear all i want to change text direction of text box with in datagrid
control i am writting following code but it is not working.

public void SetUpClientScript(object sender, DataGridItemEventArgs e)
{
//when item type is footer
if(e.Item.ItemType == ListItemType.Footer)
{
TextBox addStateNo_TextBox =
(TextBox)e.Item.FindControl("addStateNo_TextBox");
addStateNo_TextBox.Attributes.Add("rtl","<style>in put{direction:rtl}</style>");

}
//when item type is edit item
if(e.Item.ItemType==ListItemType.EditItem)
{
TextBox editStateNo_TextBox =
(TextBox)e.Item.FindControl("editStateNo_TextBox") ;
editStateNo_TextBox.Attributes.Add("rtl","<style>i nput{direction:rtl}</style>");
}
}

can any tell me what is the problem with in it.

Aug 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mr. B | last post by:
In my app, I get all the info/data that I want from an Access data base. In one place I've the information displayed on a ListView. I let a user click on any line and then an 'edit' button. ...
8
by: amber | last post by:
Hello, How can I trigger an event, when a value (cell) in my datagrid changes? TIA, amber
0
by: Jason Gleason | last post by:
I have a question about the asp.net datagrid in c#. i have the following grid... <asp:datagrid id="RosterList" runat="server" Font-Names="Verdana" BorderColor="Black" GridLines="Vertical"...
0
by: gh0st54 | last post by:
hi still working on changing my data grid headers using resource files the thing is i always gat a count of 0 for my datagrid columns count, when will i get the columns count and when should i...
6
by: timbobd | last post by:
I have a Windows form that displays a database table in a DataGrid. When you click on a row, the row's values get copied to bound TextBoxes below, and when the "Save" button is clicked the database...
2
by: Billy | last post by:
Change DataGrid EditControl On Data Value Hi, I have a datagrid, and on editing, I want to change the control in the third colunm based on the value of the first column. The value in the...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
1
by: HenHouse | last post by:
Hi all; I think I've asked this question before but it looks like I'm going to need a deeper understanding of the problem rather than just a quick fix... I have three tables represented by three...
1
by: simonyong | last post by:
Hi, I have a hyperlinkbutton in my datagrid Initially, I set the text of the hyperlink button as "show" once user click it, i want it to change into "view more detail" I tried to change...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.