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
570
Set DataFormatString in server-side code for a specific cell
posted

 Is there a way to set the DataFormatString in server-side code?  I would like to see if it is possible to set the DataFormatString of a specific cell.  I see an attribute FormatFieldMethod but dont understand how to set/change it.  Thanks.

Parents
No Data
Reply
  • 5
    posted

    You can try this code, it works for me:

            protected override void OnInit(EventArgs e)

            {

                _datagrid.Load += (grid, arg) =>

                {

                    ((iggrid.WebDataGrid)grid).Columns[0].FormatFieldMethod = (field, value) =>

                    {

                        return "Hello";

                    };

                };

            }

Children
No Data