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
75
Multiple binding at runtime
posted

Hi,

I am creating grid at runtime.

in FieldLayoutInitialized i am creating unbound fields.

one sample unbound field is

UnboundField field = new UnboundField();

field.Name= "Testfield";

field.BindingPath = "Binding path";

FieldLayout fieldLayout;

 fieldLayout.Fields.Add(field)

--------------------------------------------

But my requirement is i have a field which is calculated one so for that i created converter. coverter will ruturn sum of two values.

A3 = A1+A2;

If it is from XAML file we can write like

 <Textbox.Value>

 <MultiBinding Converter="{StaticResource ConvertnameClass}" Mode="OneWay">
                        <Binding Path="A1"/>
                        <Binding Path="A2"/>
                    </MultiBinding>

     </Textbox.Value>.

 

field.Converter = coverter class object;
field.ConverterParameter = ???;

 

if it is single binding we can send the
                field.BindingPath = "class prop value";

how can i send multiple binding values to converter from code behind when it is creating run time.

please help me out.

Parents
  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking through it and I can say that you can create a style for the CellValuePresenter in XAML and set the MultiBinding there and after that you can apply that Style to the UnboundField’s FiledSettings CellValuePresenterStyle Property in code – behind. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

Reply Children