Custom Conditional Formatting from the Documentation Example Locks up the Grid

Posted by: canderson70 on 9 September 2017, 8:29 am EST

  • Posted 9 September 2017, 8:29 am EST

    http://helpcentral.componentone.com/nethelp/c1flexgridlightswitch/#!examplecustomization1.htm

    Testing the example code from the above link, against a copy my developer data. Some of the formatting works but the Grid appears to be 'Locked up'. I can add, edit and delete records and save the changes, but have to hit Refresh for the grid to update. Not able to sort or select anything in the grid. Would really like to use this tool but seems to have some issues with basic functionality.

    Code we are using...

    namespace LightSwitchApplication
    {
    public partial class FlexibleOrdersByTenantIdGrid
    {
    partial void FlexibleOrdersByTenantIdGrid_Created()
    {
    IContentItemProxy proxy = this.FindControl("C1FlexGrid");
    proxy.ControlAvailable +=
    new EventHandler(proxy_ControlAvailable);
    }
    public void proxy_ControlAvailable(object sender, ControlAvailableEventArgs e)
    {
    C1.Silverlight.FlexGrid.C1FlexGrid _flex =
    e.Control as C1.Silverlight.FlexGrid.C1FlexGrid;
    LSColumn col = _flex.Columns["OrderStatus"] as LSColumn;

    TextConditionalFormat f1 = new TextConditionalFormat(Colors.Red, Colors.White, false);
    f1.Operator = ConditionOperator.Equals;
    f1.Value = "Hold";

    TextConditionalFormat f2 = new TextConditionalFormat(Colors.Yellow, Colors.White, false);
    f2.Operator = ConditionOperator.Equals;
    f2.Value = "Pending";

    TextConditionalFormat f3 = new TextConditionalFormat(Colors.Green, Colors.White, false);
    f3.Operator = ConditionOperator.Equals;
    f3.Value = "Completed";

    col.ConditionalFormats.Add(f1);
    col.ConditionalFormats.Add(f2);
    col.ConditionalFormats.Add(f3);
    }
    }
    }
  • Replied 9 September 2017, 8:29 am EST

    Hello canderson70,

    I cannot reproduce the behavior you are describing. Please try and set these values in the properties windows under "advanced". The same functionality can be achieved in this way.

    I am able to update the cells and formatting will change without a refresh of the view. Can you give me a specific example of what is happening?

    Regards,
    Justin
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels