c# - How to add popupcontainer edit in the gridcontrol devexpress -


i developing application in wpf using mvvm design pattern. in 1 of user controls have gridcontrol (devexpress). gridcontrol bound datatable in viewmodel class . example columns of datatable begin date , end date ,value, comments. in column of comments want pop container appear in gridcontrol. possible that?

first add following xaml namespaces xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"

you can use gridcolumn.editsettings edit or view cell within editor following inside <dxg:gridcontrol>

<dxg:gridcontrol.columns >       <dxg:gridcolumn fieldname="begindate">                <dxg:gridcolumn.editsettings>                     <dxe:dateeditsettings/>                </dxg:gridcolumn.editsettings>      </dxg:gridcolumn>       <dxg:gridcolumn fieldname="enddate">                <dxg:gridcolumn.editsettings>                     <dxe:dateeditsettings/>                </dxg:gridcolumn.editsettings>      </dxg:gridcolumn>      <dxg:gridcolumn fieldname="value"/>      <dxg:gridcolumn fieldname="comment">                <dxg:gridcolumn.editsettings>                     <dxe:memoeditsettings/>                </dxg:gridcolumn.editsettings>      </dxg:gridcolumn> </dxg:gridcontrol.columns> 

and on side note use observablecollection<t>.

u:to have custom control column use datatemplate

<dxg:gridcolumn fieldname="fieldname">    <dxg:gridcolumn.celltemplate>         <datatemplate>             <youcontrolnamespace:somecustomcontrol x:name="part_editor"/>         </datatemplate>     </dxg:gridcolumn.celltemplate> </dxg:gridcolumn> 

u: last comment use dxe:popupbaseeditsettings controltemplate

<dxg:gridcolumn fieldname="fieldname">       <dxg:gridcolumn.editsettings>               <dxe:popupbaseeditsettings>                    <dxe:popupbaseeditsettings.popupcontenttemplate>                         <controltemplate>                                   <!--your controls popup here-->                         </controltemplate>                    </dxe:popupbaseeditsettings.popupcontenttemplate>               </dxe:popupbaseeditsettings>          </dxg:gridcolumn.editsettings> </dxg:gridcolumn> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -