John1grid Posted April 10, 2008 Report Share Posted April 10, 2008 Especially because I still cannot configure the grid using visual studio designer, due to a control error, I need to do things in program code. For example I want to set up a column with a circular guage and another with a traffic light. The only program example I could find anywhere shows only how to do a linear guage: http://support.softwarefx.com/SupportDocTree.aspx?Prod=GridFX10&Type=P It looks like the NumberFormatter may be the solution but I see no guidance or examples on how to link it to a column with a guage. Quote Link to comment Share on other sites More sharing options...
PDyer Posted April 11, 2008 Report Share Posted April 11, 2008 In regards the sample that shows how to add a Radial Gauge, you can find a full VS2005 sample installed with Grid FX called "RealEstate", in that sample open the form called "Layout_Gauges". There you will find the following: // a NumberField object is cast as grid amount field GridFX.WebForms.NumberField numField = (GridFX.WebForms.NumberField)Grid1.DataFields["amount"]; // Default display setting is changed to Gauge numField.Format.Display = GridFX.WebForms.NumberDisplayType.Gauge; // Let's show a radial gauge ChartFX.WebForms.Gauge.RadialGauge Gauge1 = new ChartFX.WebForms.Gauge.RadialGauge(); // Let's create a RadialScale object, later used to add sections to the gauge ChartFX.WebForms.Gauge.RadialScale radialScale1 = new ChartFX.WebForms.Gauge.RadialScale(); // INCLUDE HERE YOUR settings to personalize your Gauge ChartFX.WebForms.Gauge.Section gSection1 = new ChartFX.WebForms.Gauge.Section(); gSection1.Bar.Color = System.Drawing.Color.FromArgb(124, 252, 0); gSection1.Max = 280000; gSection1.Min = 0; // VERY IMPORTANT LINE //Let's format the gauge with all previously customized attributes (Section/Indicator/needle/RadialScale) numField.Format.Gauge = Gauge1; Please post a screen shot with the control error you mentioned. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.