Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
Possibility to indent a row?
posted

Hi folks,

is there a possibility to indent a row or text in a row when it's bound to the WebHierarchical Data Grid?

Take a look on my sample.

protected void WebHierarchicalDataGrid1_InitializeRow(object sender, RowEventArgs e)
    {
        if (e.Row.Items.Record.DataItem.ToString().Contains("AppJobProtokollEntity"))
        {
            int Level = (int)e.Row.Items.GetValue(2);

            for (int i = 1; i < Level; i++)
            {
                e.Row.Items[1].Text = "\t" + e.Row.Items[1].Text;
            }
        }
    }

It tested that one. But the will not be shown :-((.


Kindly Regards,

David Mueller

Parents
No Data
Reply
  • 325
    posted

    I got it with Method:

    WebHierarchicalDataGrid1_InitializeRow

    then you can set the text with HTML Code like this:

    int Value = 100;

     

     

    String

     

     

    .Format("<div style='text-indent:"+Value+"px;'>{0} </div>",e.Row.Items1].Text);

     

    The text will be set 100 Pixels to the right.

    Regards

Children
No Data