Telerik Forums
UI for WinForms Forum
2 answers
107 views

     I am getting a Object variable not set error while adding a child template to master template of grid view

here is my code

            {
                grddisplaygrid.DataSource = (DataTable)TransactionController.FetchObject("Itemdetails");
            }

           
           GridViewMultiComboBoxColumn tempmulticombo = (GridViewMultiComboBoxColumn)grddisplaygrid.Columns["BatchNo"];
            tempmulticombo.HeaderText = TransactionController.g_strbatchCaption == "" ? tempmulticombo.HeaderText : TransactionController.g_strbatchCaption;
            tempmulticombo = (GridViewMultiComboBoxColumn)grddisplaygrid.Columns["StockNo"];
            tempmulticombo.HeaderText = TransactionController.g_strStockNoCaption == "" ? tempmulticombo.HeaderText : TransactionController.g_strStockNoCaption;
            GridViewComboBoxColumn tempcombo = (GridViewComboBoxColumn)grddisplaygrid.Columns["SMGUid"];
            tempcombo.IsVisible = false;
            tempcombo = (GridViewComboBoxColumn)grddisplaygrid.Columns["UOM"];
            DataTable dttemp = GetUOmlist();
            tempcombo.DataSource = dttemp;
            tempcombo.DisplayMember = "UnitSymbol";
            tempcombo.ValueMember = "QBGUID";
            tempcombo.DropDownStyle = RadDropDownStyle.DropDownList;
            tempcombo.AutoCompleteMode = AutoCompleteMode.Suggest;
            #region item level Location
            if (TransactionController.g_intLocationenabled == 3)
            {
                tempmulticombo = (GridViewMultiComboBoxColumn)grddisplaygrid.Columns["LocationCd"];
                tempmulticombo.IsVisible = true;
                tempmulticombo.Width = 100;
                tempmulticombo.ReadOnly = false;
                tempmulticombo.HeaderText = TransactionController.g_strlocationCaption == "" ? tempmulticombo.HeaderText : TransactionController.g_strlocationCaption;
            }
            #endregion item level Location

            OverrideColumnVisibility();
            if (TransactionController.g_intDisplayImageinItemDisplaygrid > 0)
            {
                GridViewImageColumn colimage = (GridViewImageColumn)grddisplaygrid.Columns["ItemImage"];
                colimage.IsVisible = true;
            }
            templatesubdetails = new GridViewTemplate();
            templatesubdetails.AllowAddNewRow = false;
            templatesubdetails.AllowEditRow = false;
            templatesubdetails.AllowDeleteRow = false;
            templatesubdetails.ShowRowHeaderColumn = false;
            if (dtsubitemdetails.Columns.Count > 0) { dtsubitemdetails.Columns.Clear(); }
            dtsubitemdetails.Columns.Add("cStockNo", typeof(string));
            dtsubitemdetails.Columns.Add("cItemDesc", typeof(string));
            dtsubitemdetails.Columns.Add("cBatchNo", typeof(string));
            dtsubitemdetails.Columns.Add("cQty", typeof(decimal));
            dtsubitemdetails.Columns.Add("cUOM", typeof(string));
            dtsubitemdetails.Columns.Add("cItemGUID", typeof(string));
            dtsubitemdetails.Columns.Add("cBatchGuid", typeof(string));
            dtsubitemdetails.Columns.Add("cBOMItemGuid", typeof(string));
            dtsubitemdetails.Columns.Add("cRowsrlno", typeof(int));
            dtsubitemdetails.Columns.Add("cBOMQty", typeof(decimal));
            dtsubitemdetails.Columns.Add("BatchEnabled", typeof(int));
            dtsubitemdetails.Rows.Clear();
            templatesubdetails.DataSource = dtsubitemdetails;

            templatesubdetails.Columns["cItemGUID"].IsVisible = false;
            templatesubdetails.Columns["cRowsrlno"].IsVisible = false;
            templatesubdetails.Columns["cBOMQty"].IsVisible = false;
            templatesubdetails.Columns["cBatchGuid"].IsVisible = false;
            templatesubdetails.Columns["cBOMItemGuid"].IsVisible = false;
            templatesubdetails.Columns["BatchEnabled"].IsVisible = false;
            templatesubdetails.Columns["cStockNo"].HeaderText = "Stock No.";
            templatesubdetails.Columns["cStockNo"].Width = 100;
            templatesubdetails.Columns["cItemDesc"].HeaderText = "Description";
            templatesubdetails.Columns["cItemDesc"].Width = 120;

            templatesubdetails.Columns["cBatchNo"].HeaderText = "Batch Number";
            templatesubdetails.Columns["cBatchNo"].Width = 100;
            templatesubdetails.Columns["cBatchNo"].IsVisible = TransactionController.g_intbatchEnabled > 0 ? true : false;

            GridViewDecimalColumn deccolumn = (GridViewDecimalColumn) templatesubdetails.Columns["cQty"];
            deccolumn.HeaderText = "Qty.";
            deccolumn.Width = 70;
            deccolumn.DecimalPlaces = 3;
            deccolumn.FormatString = "{0:N3}";

            templatesubdetails.Columns["cUOM"].HeaderText = "Per";
            templatesubdetails.Columns["cUOM"].Width = 80;
            grddisplaygrid.MasterTemplate.Templates.Clear();
            grddisplaygrid.Relations.Clear();
           
            
           grddisplaygrid.MasterTemplate.Templates.Add(templatesubdetails);

 

getting the error while executing the above line of code. kindly help me to solve the issue.

           

Nadya | Tech Support Engineer
Telerik team
 answered on 22 May 2020
16 answers
1.0K+ views
How can I change SplitPanel collapse direction.
Using RadSplitContainer with 2 panels I need panel 2 collapsable to down, not up, hidding panel 1!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 May 2020
2 answers
115 views

Hello,

I have a small amount of data that's already been grouped and sorted by sql. It looks something like this:

 

value - category name

25 - Cat1
15 - Cat2
5  - Cat3

Each time I run the query, I may receive different categories with different names and different values. These categories, if I understand how the ChartView works correctly, are represented via Series. Since my data is dynamic, how should I go about creating these series on the fly? Most of the examples I've seen use hard coded series. I'm sure I can hack it together, but I'd rather ask first in case there's a better way. Btw, I did search the forums and found a post where someone is using VB and Linq to get a list of categories. That may work, but its from 2012 so I thought I'd ask.

 

Thanks!

Michael
Top achievements
Rank 1
Veteran
 answered on 19 May 2020
2 answers
203 views

Hello. 

 

I need print mĂșltiples radchartview on a document, it's posible this?.

I know that i can use radchartview.print() for one chart but one how print one document with 2 or more pages with 2 o more radchartvew?.

 

Thanks and apologies for my English. 

Miguel
Top achievements
Rank 1
 answered on 18 May 2020
1 answer
390 views
Is it possible to replace the context menu with a date picker control?  I don't want to post my code because if I have been able to show the date picker it has been sharply compressed.  Do I remove the items - or just hide them?  Where do I add the date picker control?  And how do I make it bigger - it automatically appears as 200, 20 and I need it to be 300, 300 at least
Nadya | Tech Support Engineer
Telerik team
 answered on 15 May 2020
3 answers
318 views

I have a grid where a hyperlink sometimes needs to be displayed as red. How is this done?

The following doesn't work.

Private Sub dgvXref_CellFormatting(sender As Object, e As CellFormattingEventArgs) Handles dgvXref.CellFormatting
If Not IsNothing(lXrefRowIdx_RAInHistory) andalso lXrefRowIdx_RAInHistory.Contains(e.RowIndex) Then
e.CellElement.ForeColor = Color.Red
End If
End Sub
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
 answered on 14 May 2020
1 answer
226 views

hi all.

can I change waiting Style with GIF or other Animations in waiting bar control?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 May 2020
2 answers
150 views

Created a sample Winform core project and can't add any more assemblies other than the three that I started with (WinControls, WinControls.UI, and TelerikCommon). Nuget and browsing doesn't work.

What do I need to do?

Ken

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 May 2020
3 answers
177 views

 Hi everybody !

   I Have this xml that load the radLayout Control?

   <RadLayoutControl TabIndex="0">
  <Items>
    <Telerik.WinControls.UI.LayoutControlSeparatorItem Bounds="0, 0, 910, 4" Name="layoutControlSeparatorItem3" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="0, 376, 455, 251" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="455, 376, 455, 251" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="0, 198, 455, 178" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="455, 198, 455, 178" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="0, 4, 455, 194" />
    <Telerik.WinControls.UI.LayoutControlItem AssociatedControlName="" DrawText="False" Text="" Bounds="455, 4, 455, 194" />
  </Items>
</RadLayoutControl>

  When load the layout from "this.radLayoutControl2.LoadLayout(pathTheXml);" My ideia is set in each LayoutControlItem the Chart. I try this:

    var itens = this.radLayoutControl2.Items.OfType<LayoutControlItem>().ToList();
            var layoutSeparator = this.radLayoutControl2.Items.OfType<LayoutControlSeparatorItem>().FirstOrDefault();

            foreach (var newTeamMemberItem in itens)
            {
                RadChartView radChartView = new RadChartView();
                radChartView.Title = "AAAAAA";
                radChartView.Name = "radChartView" + index;
                radChartView.ThemeName = this.radLayoutControl1.ThemeName;
                setChart(chartModelArea, radChartView, EnumTipoGrafico.Barra);

                newTeamMemberItem.Name = "nameStart";
                newTeamMemberItem.AssociatedControl = radChartView;
                newTeamMemberItem.DrawText = true;
                newTeamMemberItem.MaxSize = newTeamMemberItem.MaxSize;
                newTeamMemberItem.MinSize = newTeamMemberItem.MinSize;
                newTeamMemberItem.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
                newTeamMemberItem.TextFixedSize = 26;
                newTeamMemberItem.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
                newTeamMemberItem.TextPosition = Telerik.WinControls.UI.LayoutItemTextPosition.Top;
                newTeamMemberItem.TextSizeMode = Telerik.WinControls.UI.LayoutItemTextSizeMode.Fixed;

                if (layoutSeparator != null)
                this.radLayoutControl2.AddItem(newTeamMemberItem, layoutSeparator, LayoutControlDropPosition.Bottom);
                else
                    this.radLayoutControl2.AddItem(newTeamMemberItem, newTeamMemberItem, LayoutControlDropPosition.Bottom);
            }

 

    But this doesn't work. Can you help please. Thanks

 

   

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 May 2020
4 answers
291 views

I am working on reporting system using the Telerik GridView.When I group and export in pdf a report, I need to show only summary row for all group levels.I have attached an example of what I need to do (winform telerik)

 Does any one have an suggestions on how to do this?

kevin
Top achievements
Rank 1
 answered on 10 May 2020
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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?