Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Add-in and Lookup / DrillDown

$
0
0
Dear all,
one of my customer asked me to have textbox with background color, at first i thought that it was possible using add-in; i have done and everything looks fine until i have used my control add-in on a field where i have tabel relation. The ... button doesn't not aper, also if i try with C/AL look up triggers nothing apears (no button ... or the down Arrow).

Looking on the C# code i see that i overwrite the standard nav object with a textbox, so i don't have all the standard feature.

Someone know if there is a way to extend the standard nav objects? in this case add a backcolor to standard nav textbox?

I have also thought to create a C# Class that simulate standard nav object but i haven't found documentation on how is possibile to call a page in lookupmode and get the result value.

](*,)
can someone give me a hint?

a peace of code:
[ControlAddInExport("Abs.NAV2013.FieldBackLightCoral")]
public class FieldBackLightCoral : StringControlAddInBase
{
TextBox control;
/// Defines the text box control.
protected override Control CreateControl()
{
control = new TextBox();

//control.MinimumSize = new Size(50, 0);
//control.MaximumSize = new Size(500, Int32.MaxValue);

control.BackColor = Color.LightCoral;

return control;
}
[ApplicationVisible]
public void setColor(int Valore)
{
switch (Valore)
{
case 0:
control.BackColor = Color.LightBlue;
break;

case 1:
control.BackColor = Color.LightCoral;
break;

case 2:
control.BackColor = Color.LightCyan;
break;

case 3:
control.BackColor = Color.LightGreen;
break;

case 4:
control.BackColor = Color.LightYellow;
break;

case 5:
control.BackColor = Color.Red;
break;
}


}
}


Best regards
Lorenzo Vitangeli

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>