// Manually add a filtering row in ultragrid
If (this. button3.text = "query ")
{
This. ultrated1.displaylayout. Override. filteruitype = infragistics. Win. ultrawingrid. filteruitype. filterrow;
This. ultrated1.displaylayout. Override. filterevaluationtrigger = infragistics. Win. ultrawingrid. filterevaluationtrigger. oncellvaluechange;
This. ultrated1.displaylayout. Override. filteroperatorlocation = infragistics. Win. ultrawingrid. filteroperatorlocation. hidden;
This. ultrated1.displaylayout. Override. filteroperatordefavalue = infragistics. Win. ultrawingrid. filteroperatordefavalue. startswith;
This. ultrated1.displaylayout. Override. filterclearbuttonlocation = infragistics. Win. ultrawingrid. filterclearbuttonlocation. rowandcell;
This. ultrated1.displaylayout. Override. filterrowprompt = "Click here to start querying ...";
This. ultrated1.displaylayout. Override. filterrowpromptappearance. backcoloralpha = infragistics. Win. Alpha. opaque;
This. ultrated1.displaylayout. Override. specialrowseparator = infragistics. Win. ultrawingrid. specialrowseparator. filterrow;
This. ultrated1.displaylayout. Override. specialrowseparatorappearance. backcolor = color. fromargb (233,242,199 );
This. ultrated1.displaylayout. Override. filteroperandstyle = infragistics. Win. ultrawingrid. filteroperandstyle. usecolumneditor;
This. button3.text = "cancel ";
}
Else
{
Ultrabod1.rows. columnfilters. clearallfilters ();
This. ultrated1.displaylayout. Override. filteruitype = infragistics. Win. ultrawingrid. filteruitype. default;
This. ultrated1.displaylayout. Override. filterevaluationtrigger = infragistics. Win. ultrawingrid. filterevaluationtrigger. default;
This. ultrated1.displaylayout. Override. filteroperatorlocation = infragistics. Win. ultrawingrid. filteroperatorlocation. default;
This. ultrated1.displaylayout. Override. filteroperatordefavalue = infragistics. Win. ultrawingrid. filteroperatordefavalue. default;
This. ultrated1.displaylayout. Override. filterclearbuttonlocation = infragistics. Win. ultrawingrid. filterclearbuttonlocation. default;
This. ultrated1.displaylayout. Override. filterrowprompt = "Click here to start querying ...";
This. ultrated1.displaylayout. Override. filterrowpromptappearance. backcoloralpha = infragistics. Win. Alpha. default;
This. ultrated1.displaylayout. Override. specialrowseparator = infragistics. Win. ultrawingrid. specialrowseparator. default;
This. ultrated1.displaylayout. Override. specialrowseparatorappearance. backcolor = color. fromargb (233,242,199 );
This. ultrated1.displaylayout. Override. filteroperandstyle = infragistics. Win. ultrawingrid. filteroperandstyle. default;
This. button3.text = "query ";
}
// Set the Row Height of ultragrid
Ultrabod1.displaylayout. Override. defaultrowheight = 50;
// Set the ultragrid width
Ultrabod1.displaylayout. Override. defaultcolwidth = 120;
//