Telerik Forums
UI for WinForms Forum
4 answers
242 views
I'm using a negative left margin on my tab items.  This causes the tab items to overlap each other a little.  This works during run time, but not at runtime.  At runtime, the tabs start out with the default spacing until I scroll the tabs.  If there aren't enough tabs to cause the scroller to appear, I have to shrink the form to get the scroller, then scroll the tabs and then resize the form again.

Ideally, the tabs would start out overlapping, but I've been looking for a workaround.  Unfortunately, I can't find one.  I've tried refreshing, repainting, invalidating, etc, etc.  The only way I can find to get the tabs to overlap is to scroll them.

Has anyone tried to overlap tabs?  If so, how do you do it?
Has anyone used negative margins before?  If so, have you seen this problem?
Can anyone think of anything to help me.

Thank you.
Shruti
Top achievements
Rank 1
 answered on 05 Apr 2017
6 answers
939 views
Got a chart and elsewhere user gets to pick a color.  How can I force a particular series to render in the user specified color?

Thanks -
Scott

Hristo
Telerik team
 answered on 03 Apr 2017
1 answer
241 views

I have changed the Label on the Trackball to the data I want to display. In this case it is 4 lines. I would like to change the color of each line of text individually. I can change the color of all of the text in the label, but not on a line by line basis. Here is a snippet of my code:

ChartTrackballController trackBallController = new ChartTrackballController();
trackBallController.TextNeeded += TrackBallController_TextNeeded;
radChartView1.Controllers.Add(trackBallController);

 

private void TrackBallController_TextNeeded(object sender, TextNeededEventArgs e)
{
        CategoricalDataPoint dataPoint1 = e.Points[0].DataPoint as CategoricalDataPoint;
        CategoricalDataPoint dataPoint2 = e.Points[1].DataPoint as CategoricalDataPoint;
        e.Element.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
        e.Element.ForeColor = System.Drawing.Color.Blue;
 
        float difference = Math.Abs((float)dataPoint1.Value - (float)dataPoint2.Value);
 
        e.Text = string.Format("Line1: {0}\nLine2: {1}\nLine3: {2}\nLine4: {3}", dataPoint1.Category, dataPoint1.Value, dataPoint2.Value, difference);           
}
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Apr 2017
1 answer
209 views
I've upgraded multiple machines and installed multiple version of Visual Studio and Telerik Controls to no avail.  The designer is almost completely useless to use. I can't size anything correctly and all controls are very small.  Then when running my application, if I use the GridViewSpreadExport/Renderer, the entire application goes into "TinyFont" mode and nothing is scaled properly.

I've attempted all fixes I can think of, but there is no code that I'm writing that should cause any of this.  I've attached images.  Any help is appreciated.

Tim
-- Below is the code that causes issues with scaling after spreadsheet export:

 private void rbExcel_Click(object sender, EventArgs e)
        {
          
            this.progressBar.Visible = true;
            if (File.Exists(BusinessLogic.MyDocFolder + "MyTimeExport.xlsx"))
            {
                File.Delete(BusinessLogic.MyDocFolder + "MyTimeExport.xlsx");
            }

            var spreadExporter = new GridViewSpreadExport(this.rgvWorkEfforts);
            var exportRenderer = new SpreadExportRenderer();
            spreadExporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.ExportAsHidden;
            spreadExporter.AsyncExportProgressChanged += spreadExporter_AsyncExportProgressChanged;
            spreadExporter.AsyncExportCompleted += spreadExporter_AsyncExportCompleted;
            spreadExporter.RunExportAsync(BusinessLogic.MyDocFolder + "MyTimeExport.xlsx", exportRenderer);

        }
Ralitsa
Telerik team
 answered on 03 Apr 2017
5 answers
167 views

Hello,

probably this will be a really simple and stupid question but nevertheless, I am stuck.

 

This is what I tried to do: We store rtf in a database and are planning to use Telerik controls in the future (there is a lot of impressive software inside).

Importing the rtf-text to RichTextEditor is quite easy. I simply put the content of the database field into a string variable and import it into RichtextEditore with this code:

Private Sub ImportRtf()
        Dim provider As New RtfFormatProvider()
        content = CStr(DataGridView.CurrentRow.Cells(xx).Value)
        Me.RadRichTextEditor1.Document = provider.Import(content)
    End Sub

This works perfectly.

After editing the text in RichTextEditor I need to export the new text as rtf to a string to store it in the database. I looked over the documentation and found this:

Public Function ExportToRtf(ByVal document As RadDocument) As String
        Dim provider As New RtfFormatProvider()
        Return provider.Export(document)
End Function

I tried to assign the function's return value to an another string variable:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim content1 As String = ExportToRtf()
        MsgBox(content1)
End Sub

VisualStudio puts a wiggled blue line under ExportToRtf() and demanded a missing argument for the functions's parameter "document".

Please tell me where my fault is.

Thanks in advance.

P. Arnold

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Apr 2017
10 answers
1.0K+ views

Hi,

// dt is obtains from a database and contains the SQL Look like "Select ID, Parent_ID, Description from Customers"
// Customers is a self-reference table with Parent and Child Relationship

dt is a HUGE recordset contains more than 200,000 records. The Bottle-neck when I executed the code is the DataBinding, it stops on the line RadGridView1.DataSource = dt; Since it is the self-reference table...the RadGridView is display in hierarchy... e.g. Parent has child...child has another child... levels by levels...

public void Page_Load()
{
RadGridView1.BeginUpdate()
RadGridView1.DataSource = dt; 
RadGridView1.Relations.Clear(); 
RadGridView1.Relations.AddSelfReference(RadGridView1.MasterTemplate, "ID", "PARENT_ID"); 
RadGridView1.EndUpdate()
}

My Question is...Can I display the levels by demand ? Yes...there is a demo example on http://www.telerik.com/help/winforms/gridview-hierarchical-grid-load-on-demand-hierarchy.html BUT it is not related to self-reference table...Do you guys has any better approach to do it ?

Many Thanks!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2017
1 answer
414 views

Hi.

In my grid I've got some columns with double values. Some of the values might be null values or Double.NaN resp.
However, in a summary row I need value counts, average and standard deviation of the values - excluding the null values!
How can I customize the grid aggregate functions to achieve this?
I experimented with GridViewSummaryItem.AggregateExpression a bit, but I don't know how to formulate an If-Condition to skip the null value row.
My code so far looks like this:

        Dim avg As New GridViewSummaryRowItem()
        Dim count As New GridViewSummaryRowItem()
        Dim stdev As New GridViewSummaryRowItem()
        For col As Integer = 2 To table.Columns.Count - 1
            Dim row_cnt As New GridViewSummaryItem()
            row_cnt.Name = table.Columns(col).ColumnName
            row_cnt.Aggregate = GridAggregateFunction.Count
            row_cnt.FormatString = "# {0}"
            count.Add(row_cnt)
            Dim row_avg As New GridViewSummaryItem()
            row_avg.Name = table.Columns(col).ColumnName
            row_avg.Aggregate = GridAggregateFunction.Avg
            row_avg.FormatString = "Ø {0:F4}"
            avg.Add(row_avg)
            Dim row_stdev As New GridViewSummaryItem()
            row_stdev.Name = table.Columns(col).ColumnName
            row_stdev.Aggregate = GridAggregateFunction.StDev
            row_stdev.FormatString = "σ {0:F4}"
            stdev.Add(row_stdev)
        Next
        grd_data_.SummaryRowsBottom.Add(count)
        grd_data_.SummaryRowsBottom.Add(avg)
        grd_data_.SummaryRowsBottom.Add(stdev)

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2017
22 answers
531 views
hi...

i am using RadMaskedEditBox.....

after adding Maskededitbox value,i cleared maskedbox.

but it is cleared but if we try to enter another value it shows old value...

how to avoid that?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2017
2 answers
69 views

Hello dear,

I can save layout for more than one grid view in the same file ??, for example:

i have gv1 and gv2, i want to save layout for all grids in one file so i can do this ?? if yes let me know, thanks.

Ammar
Top achievements
Rank 1
 answered on 29 Mar 2017
7 answers
95 views

In winforms Radgridview whenever I need to create a new row I have been generating a class with members for each column like:

public class stopCreationRow
   {
       public string shipper, consignee, zip;
   }

 

Then I create and use it for adding rows like:

private void radButton35_Click(object sender, EventArgs e)
  {
      stopCreationRow newRow = new stopCreationRow();
      //throughout the code set the various fields as needed
      newRow.consignee = "person";
      newRow.shipper = "new shipper";
       
      //then transfer everything to the proper cells
      GridViewDataRowInfo dataRowInfo = new GridViewDataRowInfo(this.stopCreation_grid.MasterView);
      dataRowInfo.Cells["consignee"].Value = newRow.consignee;
      dataRowInfo.Cells["shipper"].Value = newRow.shipper;
       
      //finally create the row
      stopCreation_grid.Rows.Add(dataRowInfo);
       
  }

 

My question is two fold:

1. Can I somehow use newRow from above to directly create the row?

2. Instead of created my own class, since all this information is already in the datagrid can I access the field names though a class derived from the datagrid?

Joe
Top achievements
Rank 2
 answered on 28 Mar 2017
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?