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

S

Santosh

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>input{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>input{direction:rtl}</style>");
}
}

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top