c# - How to access RadGridView row programmatically? -
how access row in radgridview ? want set row opacity programmatically, possible ? can't find document it.
<telerik:radgridview x:name="radgridstoppedcars" showgrouppanel="false" isfilteringallowed="false" selectionchanged="radgridstoppedcars_selectionchanged" background="transparent" itemssource="{binding perworkz}" width="550" height="500" margin="800, 90,432,-53" rowheight="45" issynchronizedwithcurrentitem="true" rowindicatorvisibility="collapsed" canusersortcolumns="false " isreadonly="true" showcolumnsortindexes="false" autogeneratecolumns="false" canuserfreezecolumns="false" canuserresizecolumns="false"> <telerik:radgridview.rowstyle> <style targettype="{x:type telerik:gridviewrow}"> <setter property="foreground" value="white"/> </style> </telerik:radgridview.rowstyle> <telerik:radgridview.columns> <telerik:gridviewdatacolumn header="plaka" datamemberbinding="{binding plateno}" width="120"/> <telerik:gridviewdatacolumn header="süre" datamemberbinding="{binding stoppeddatetime}" width="*"/> <telerik:gridviewdatacolumn header="durum" datamemberbinding="{binding typeworkflowstatename}" width="*"/> <telerik:gridviewdatacolumn header="açıklama" datamemberbinding="{binding note}" width="*"/> <telerik:gridviewdatacolumn header="süreç" datamemberbinding="{binding timeinfo}" width="*"/> <telerik:gridviewexpressioncolumn header="{binding personnelid}" isvisible="false"/> <telerik:gridviewexpressioncolumn header="{binding departmentid}" isvisible="false"/> </telerik:radgridview.columns> </telerik:radgridview>
try use this:
e.rowelement.drawfill = true; void grid_rowformatting(object sender, telerik.wincontrols.ui.rowformattingeventargs e) { if (e.rowelement.rowinfo.cells["code"].value.tostring() == "something")) { e.rowelement.drawfill = true; e.rowelement.backcolor = system.drawing.color.somecolor; } }
i don't see other way formatting unless applying xaml...
Comments
Post a Comment