Sunday, 15 June 2014

WPF c# datagrid set individual row height -



WPF c# datagrid set individual row height -

i pretty new wpf , c#. trying create datagrid can programmatically set height of individual rows.

it seems possible alter height rows together, rows have different heights each other.

does know way accomplish this? (i thinking set row height automatic, , set invisible textbox in unused column. alter height of unused textbox programmatically.)

the easiest thing handle in datagrid.loadingrow event raised right after row instatiated.

to add together event handler datagrid in xaml code:

<datagrid loadingrow="datagrid_loadingrow"></datagrid>

and declare eventhandler in code manage row height individually via height property:

private void datagrid_loadingrow(object sender, datagridroweventargs e) { datagridrow row = e.row; row.height = 50; //put height here }

c# wpf datagrid

No comments:

Post a Comment