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
755
FullRowSelect and Readonly
posted

Hi

 

First Question

is there a way to change the select behavior ?

i want the user to only select full rows. so if he clicks in a cell the whole row should be selected instead

 

Second Question

Is there a way to set the whole grid as readonly ?

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    Hello,

    You can set the CellClickAction property of the FieldSettings to SelectRecord in order to allow the used to select the entire record instead of selecting the cell. You can also control the selection type by setting FieldLayoutSettings SelectionTypeRecord. Here is an example for setting the CellClickAction and also setting the SelectionTypeRecord to Single which will allow you to select only one record:

     

            <igDP:XamDataGrid>
    
                <igDP:XamDataGrid.FieldLayoutSettings>
                    <igDP:FieldLayoutSettings 
                        SelectionTypeRecord="Single"/>
                </igDP:XamDataGrid.FieldLayoutSettings>
                
                <igDP:XamDataGrid.FieldSettings>
                    <igDP:FieldSettings
                        CellClickAction="SelectRecord"/>
                </igDP:XamDataGrid.FieldSettings>
    
            </igDP:XamDataGrid>
    

     

    About the second question that you are having, you can make all cells in the XamDataGrid read only be setting the AllowEdit property of the FieldSettings to False. Here is an example for doing that:

     

            <igDP:XamDataGrid>
                
                <igDP:XamDataGrid.FieldSettings>
                    <igDP:FieldSettings
                        CellClickAction="SelectRecord"/>
                </igDP:XamDataGrid.FieldSettings>
    
            </igDP:XamDataGrid>
    

     

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

     

     

Children