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

Discussion in 'ASP .Net' started by Santosh, Aug 2, 2006.

  1. Santosh

    Santosh Guest

    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.
    Santosh, Aug 2, 2006
    #1
    1. Advertising

  2. RE: How to change text direction of text box with asp.net datagrid con

    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>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.
    >
    >
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=, Aug 2, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim
    Replies:
    1
    Views:
    4,394
    seven
    Jan 23, 2005
  2. Gnarlodious
    Replies:
    4
    Views:
    17,577
    elizas
    May 5, 2010
  3. Daniel Mark

    How to change font direction?

    Daniel Mark, Sep 15, 2006, in forum: Python
    Replies:
    2
    Views:
    815
    Frederic Rentsch
    Sep 18, 2006
  4. crayon
    Replies:
    0
    Views:
    387
    crayon
    Jun 6, 2007
Loading...

Share This Page