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
275
Setting the maximum length of Field in xamgrid
posted

Hi ,

I have copied my code below.

1. I want to set the maximum length of allowed characters in "Plan Name" field.

2. Plan Assets $ Million is displaying dollar sign. Please tell me how to correct it. whenever there is a decimal field is there in db , the front end is displaying the fields with '$'.

My XAML file code is  below :   <igGrid:XamDataGrid.FieldLayoutSettings>
<igGrid:FieldLayoutSettings AutoGenerateFields="False" SelectionTypeRecord="Single" ></igGrid:FieldLayoutSettings>
</igGrid:XamDataGrid.FieldLayoutSettings>
<igGrid:XamDataGrid.FieldLayouts>
<igGrid:FieldLayout >
<igGrid:FieldLayout.Fields>
<igGrid:Field Name="PsPlanId" Label="Plan ID" >
  
    <igGrid:Field.Settings>
      
 <igGrid:FieldSettings  AllowEdit="True"  AllowGroupBy="True" CellWidth="50"  EditAsType="{x:Type System:String}"/>
    </igGrid:Field.Settings>
   
</igGrid:Field>
<igGrid:Field Name="PlanName" Label="Plan Name">
  <igGrid:Field.Settings>
 <igGrid:FieldSettings  AllowEdit="True"  AllowGroupBy="True" CellWidth="20"/>
  </igGrid:Field.Settings>
</igGrid:Field>
    <igGrid:Field Name="Ein" Label="EmployerID" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="True"  AllowGroupBy="True" CellWidth="20" EditAsType="{x:Type System:Int32}" />
    </igGrid:Field.Settings>
</igGrid:Field>

<igGrid:Field Name="PlanTypeId" Label="Type of Plan" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="False" AllowGroupBy="True" CellWidth="20" CellValuePresenterStyle="{StaticResource ComboInPlanTypeStyle}"/>
    </igGrid:Field.Settings>
</igGrid:Field>

 <igGrid:Field Name="DcAttributeTypeId" Label="DC Attribute" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="False" AllowGroupBy="True" CellWidth="20" CellValuePresenterStyle="{StaticResource buttonInCellStyle}"/>
    </igGrid:Field.Settings>
</igGrid:Field>


 <igGrid:Field Name="IsDirectedPlan" Label="Directed Plan" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="False" AllowGroupBy="True" CellWidth="20" CellValuePresenterStyle="{StaticResource ComboInDirectedPlanTypeStyle}"/>
    </igGrid:Field.Settings>
</igGrid:Field>

  <igGrid:Field Name="IsEsopPlan" Label="ESOP Plan" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="False" AllowGroupBy="True" CellWidth="20" CellValuePresenterStyle="{StaticResource ComboInDirectedPlanTypeStyle}"/>
    </igGrid:Field.Settings>
</igGrid:Field>


 <igGrid:Field Name="ParticipantCount" Label="No of Participants" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="true" AllowGroupBy="True" CellWidth="20" EditAsType="{x:Type System:Int32}" />
    </igGrid:Field.Settings>
</igGrid:Field>

 <igGrid:Field Name="PlanAssets" Label="Plan Assets $ Million" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="true" AllowGroupBy="True" CellWidth="20" CellValuePresenterStyle="{StaticResource PlanAssetsCellvalue}" />
    </igGrid:Field.Settings>
</igGrid:Field>

 <igGrid:Field Name="ModifyDate" Label="Last Updated Date" >
    <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="true" AllowGroupBy="True" CellWidth="20" />
    </igGrid:Field.Settings>
</igGrid:Field>
<igGrid:Field Name="ModifyUser" Label="Last Updated By"  >
   <igGrid:Field.Settings>
 <igGrid:FieldSettings AllowEdit="true"  AllowGroupBy="True" CellWidth="20" />
    </igGrid:Field.Settings>
   </igGrid:Field>
</igGrid:FieldLayout.Fields>
</igGrid:FieldLayout>
</igGrid:XamDataGrid.FieldLayouts>

</igGrid:XamDataGrid>

 

 

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    Hello,

    1) You can create a style for the XamTextEditor and use ValueConstraint property. You can read more about this in the following article in our help here.

    2) This is because, the default editor for Decimal value is the XamCurrencyEditor. If you do not want the currency sign, you should use XamNumericEditor, register another editor for currency value type.

    You can see how to do this, on the thread below:

    http://forums.infragistics.com/forums/p/24455/89594.aspx#89594

    Regards,

    Alex.

Children