This is a migrated thread and some comments may be shown as answers.

How to set hte properties of a newly added row ina grid ?

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bibhudutta
Top achievements
Rank 1
Bibhudutta asked on 30 Jan 2012, 07:58 AM
I want to set the "NumberFormat-DecimalDigits" of a RadNumericTextBox at run time when it is created. But I am unable to find in which event i can do so and how.

Please help me out !

1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 30 Jan 2012, 08:20 AM
Hello Bibhudutta,


protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem  item= e.Item as GridDataItem;
            RadNumericTextBox RadNumericTextBox1 = item.FindControl("RadNumericTextBox1") as RadNumericTextBox;
            // now set property here
        }
    }

or

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = e.Item as GridDataItem;
            RadNumericTextBox RadNumericTextBox1 = item.FindControl("RadNumericTextBox1") as RadNumericTextBox;
            // now set property here
        }
    }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Bibhudutta
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or