Telerik Forums
UI for WinForms Forum
7 answers
312 views
Hello,

I am wondering if I can use the UseSystemPasswordChar property with the Radtextbox. It works with the traditional texbox but does not seem to work with the radtexbox. 

For the moment, I am using an alternative solution which is:
radTextBoxNewPass.PasswordChar = '*';

Thank you,
LB

Stefan
Telerik team
 answered on 03 Feb 2014
2 answers
125 views
Hi ,

I have a RadGridView that shows some data in Hierarchical mode.

I have a problem in this scenario:

First. I expand more data in GridView(so, it shows child of node and child of child and ......).
Second. I use RadGridView,Rows.Add() function to add 1 row. The row successfully added, but the added row go bottom of gridview and the vertical Scroll lost trust value.

So, I should "up down" and "Up down" the vertical scroll to  get correct value.

any suggestion please?!
Hossein
Top achievements
Rank 1
 answered on 01 Feb 2014
1 answer
123 views
I have a databound GridView with a GridViewComboBox column, among others. I would like the scroll arrow to be on the right, not left, but I can't figure out how to set this. Can you help me?


Regards, Jill-Connie Lorentsen
Stefan
Telerik team
 answered on 31 Jan 2014
11 answers
313 views
is it possible to remove the times?

i am using the monthview where the appointments (or should i say availibilites) are in days and no time is ever specified. this gives me a 00:00AM - 00:00AM in each of the appointments which looks bad. can it be hidden?

i am binding using a dataprovider also

Cheers,
Craig
Ivan Petrov
Telerik team
 answered on 31 Jan 2014
1 answer
127 views
How do I limit legend numbers to 1 decimal place?
Ralitsa
Telerik team
 answered on 31 Jan 2014
2 answers
212 views
I have just started using the Range Selector linked to a Chart View with a Date Time Categorical axis. My issue is that I cannot seem to find the formatting setting for the date label in the Range Selector. 

Can you please help?
Stefan
Telerik team
 answered on 30 Jan 2014
2 answers
173 views
Situation
In this situation i have 3 resources/columns in the scheduler.
Every resource/column has his own available times.
I have disabled the cells when the time is not available.
I want to drag and drop a appointment in an cell.
It has to check if that cell/timeslot is available.

Problem
I don't know how to check in which column the drag and drop cell is. So it checks all resources/Columns.
If in one resource/column a cell/time is disabled then it gives back that it is not available.

How can i check in which column the selected cell is?

private void radScheduler1_DragDrop(object sender, DragEventArgs e)
        {
DragObject dragObject = e.Data.GetData(typeof(DragObject)) as DragObject;
Point point = this.radScheduler1.PointToClient(new Point(e.X, e.Y));           
SchedulerDayViewGroupedByResourceElement groupedDayViewElement = this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewGroupedByResourceElement;
SchedulerCellElement schedulerCell = SchedulerUIHelper.GetCellAtPoint(point, groupedDayViewElement.GetDayViewElements());
SchedulerCellElement schedulerCell2 = SchedulerUIHelper.GetCells(this.radScheduler1).Where(x => x.Date >= schedulerCell.Date && x.Date <= SchedulerCell.Date.AddMinutes(((double)dragObject.Values[Enums.AppointmentFields.Duration])-1)
&& x.Enabled == false).FirstOrDefault();
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Jan 2014
4 answers
119 views
Hello,
I have tried to customing a gridview row with html view like it is recommended in a few posts.
The result is not which i want, I want something like this:

[--colLeft--][----------------------col-----------------------]
[------------------------------------col-------------------------]
[--colLeft--][--colLeft--][--colLeft--][------col--------]

When I resize the gridviewI want to colLeft stay at left like:

[--colLeft--][----------------------------------------col------------------------------------]
[-----------------------------------------col---------------------------------------------------]
[--colLeft--][--colLeft--][--colLeft--][-----------------col----------------------------]


To make that I have used this C# code:

// Row struct in html view          
this.htmlView = new HtmlViewDefinition();
this.htmlView.RowTemplate.Rows.Add(new RowDefinition());
this.htmlView.RowTemplate.Rows.Add(new RowDefinition());
this.htmlView.RowTemplate.Rows.Add(new RowDefinition());
this.htmlView.RowTemplate.Rows[0].Cells.Add(new CellDefinition("IsLocked", 0, 1, 1));
this.htmlView.RowTemplate.Rows[0].Cells.Add(new CellDefinition("name", 0, 3, 1));
this.htmlView.RowTemplate.Rows[1].Cells.Add(new CellDefinition("details", 0, 4, 1));
this.htmlView.RowTemplate.Rows[2].Cells.Add(new CellDefinition("preview", 0, 1, 1));
this.htmlView.RowTemplate.Rows[2].Cells.Add(new CellDefinition("insert", 0, 1, 1));
this.htmlView.RowTemplate.Rows[2].Cells.Add(new CellDefinition("remove", 0, 1, 1));
this.htmlView.RowTemplate.Rows[2].Cells.Add(new CellDefinition("link", 0, 1, 1));

It works but when I'm resizing the gridview, cells are automaticly re-arranged (size and location) and centered so columns I want to fix on the left side (colLeft) moving. Like that:

[-------colLeft------][----------------------------------------col----------------------------------------------------]
[-----------------------------------------col----------------------------------------------------------------------------]
[-------colLeft------][-------colLeft------][------colLeft------][-----------------col----------------------------]


My question is How can I fix columns size to X pixels and location to left to make what I want?

Thanks



Anthony
Top achievements
Rank 1
 answered on 30 Jan 2014
2 answers
401 views
Hi, i want to know, if user can see the item at specifued position of ListView.
Currently i am doing like that:

bool isItemVisible(MyBusinessLogicClass c)
{
  for (int y = listView.Height; y > 10; y -= 10)
  {
     var result = listView.ElementTree.GetElementAtPoint(new Point(5, y),
            x => (x is SimpleListViewVisualItem) && ((SimpleListViewVisualItem)x).Data.DataBoundItem == c);
                 
             if (result != null)
                    return true;
    }
 
     return false;
 }


Is there any other "right" way having such ability?
Thanks!
Igor
Top achievements
Rank 2
 answered on 29 Jan 2014
1 answer
108 views
Hi,

I want to add (create and add to my datasource) multiple rows to my grid based on validating a field in the 'add new row' row.
At present, when I do this (as described below) it leaves me with the row being added. I would like to cancel the added row. In doing this I have been wondering if I am going about it all incorrectly, however:

I am unsure if I should perform some other function that captures the Add New Row functionality, if I should be doing what I'm doing (validating on CellValidating and adding the new rows) or using CellEndEdit or some other function to perform the load and cancelling the original edit.

In the grid (ProductCode, Operation, Quantity, Hours, and some resultant fields), I am trying to allow the user to enter in a specific sub-product code - to enter in one line, or to enter in a parent product code which will pre-populate a bunch of rows (for all the children meeting the criteria).

It currently is working as I want, barring the cancelEdit usage after adding in bulk. I'm not sure how to accomplish this (or do it better). Any advice would be really appreciated!

Here is basically what I currently have:
Private Sub rgvProducts_CellValidating(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellValidatingEventArgs) Handles rgvProducts.CellValidating
        Dim col As GridViewDataColumn = e.Column
        Dim validateMessage As String = ""
        lblMsg.Text = ""
 
        If quitValidating Then
            Return
        End If
 
        If e.Row IsNot Nothing Then
            'if new row and field entered is "ProductCode"
            If e.Row.GetType Is GetType(GridViewNewRowInfo) AndAlso col.FieldName = "ProductCode" Then
                If String.IsNullOrWhiteSpace(e.Value) Then
                    'show validation message: cannot be blank
                    Return
                End If
 
                Dim coreProducts As DataTable
                Dim lp As LabourProduct
                Dim resultsMessage As String = ""
 
                'Check if ProductCode value is valid against CoreProduct mapping
                If ApplicationFunctions.fieldValidate("CoreProductCode", e.Value) Then
                    coreProducts = Labour.retrieveCoreProductRows("", e.Value, cl.Operation) 'retrieve set of CoreProduct rows filtered by Operation
                    If coreProducts.Rows.Count = 0 Then
                        'show validation message: No CoreProduct items found
                        Return
                    ElseIf coreProducts.Rows.Count = 1 Then 'if single row returned, allow editing in-line
                        rgvProducts.CurrentRow.Cells("ProductCode").Value = coreProducts.Rows(0)("CoreProductCode")
                        rgvProducts.CurrentRow.Cells("Operation").Value = coreProducts.Rows(0)("Operation")
                        rgvProducts.CurrentRow.Cells("ActualQuantity").Value = coreProducts.Rows(0)("StandardQuantity")
                        rgvProducts.CurrentRow.Cells("StandardQuantity").Value = coreProducts.Rows(0)("StandardQuantity")
                        rgvProducts.CurrentRow.Cells("StandardHours").Value = coreProducts.Rows(0)("StandardHours")
                        rgvProducts.CurrentRow.Cells("EarnedHours").Value = coreProducts.Rows(0)("StandardHours")
                        rgvProducts.CurrentRow.Cells("Description").Value = coreProducts.Rows(0)("ProductDescription")
                        Return
                    Else
                        resultsMessage = ProcessCoreProductDataTable(coreProducts) 'This adds multiple rows to grid and saves the objects
                        If Not resultsMessage = "Success" Then
                            'show validation message: Error saving
                            Return
                        Else 'Here trying to rebind the data source and cancel the edit
                            ApplicationFunctions.showMsg(lblMsg, resultsMessage, ApplicationFunctions.AlertModes.Positive)
                            rgvProducts.DataSource = ""
                            rgvProducts.DataSource = cl.LabourProductList
                            rgvProducts.CancelEdit()
                        End If
                    End If
                Else 'if not matched against the CoreProduct, then trying to match against Product parent
                    coreProducts = Labour.retrieveCoreProductRows(e.Value, "", cl.Operation)
                    If coreProducts.Rows.Count > 0 Then 'if rows returned then add them
                        resultsMessage = ProcessCoreProductDataTable(coreProducts)
                        If Not resultsMessage = "Success" Then
                            ApplicationFunctions.showMsg(lblMsg, resultsMessage, ApplicationFunctions.AlertModes.Negative)
                            e.Row.ErrorText = resultsMessage
                            e.Cancel = True
                            Return
                        Else
                            ApplicationFunctions.showMsg(lblMsg, resultsMessage, ApplicationFunctions.AlertModes.Positive)
                            rgvProducts.DataSource = ""
                            rgvProducts.DataSource = cl.LabourProductList
                            rgvProducts.CancelEdit()
                        End If
                    'else show validation message: product code entered invalid
                    End If
                End If
            ElseIf (e.Row.GetType Is GetType(GridViewDataRowInfo) Or e.Row.GetType Is GetType(GridViewNewRowInfo)) And Not col Is Nothing Then 'only inline editing for any already entered rows
                validateMessage = validate(col.FieldName, e.Value)
                If validateMessage <> String.Empty Then ApplicationFunctions.showMsg(lblMsg, validateMessage, ApplicationFunctions.AlertModes.Negative)
            End If
        End If
    End Sub
     
     
    'add items in bulk and save
    Private Function ProcessCoreProductDataTable(ByRef coreProducts As DataTable) As String
        Dim saveMessage As String = ""
        Dim lp As LabourProduct
        For Each cp As DataRow In coreProducts.Rows
            lp = New LabourProduct()
            lp.LabourID = cl.LabourID
            lp.ProductCode = cp("CoreProductCode")
            lp.CoreBoxNumber = lp.ProductCode.Substring(lp.ProductCode.LastIndexOf("_C"))
            lp.Operation = cp("Operation")
            lp.ActualQuantity = cp("StandardQuantity")
            lp.StandardQuantity = cp("StandardQuantity")
            lp.StandardHours = cp("StandardHours")
            lp.EarnedHours = cp("StandardHours")
            lp.Description = cp("ProductDescription")
            If Not lp.save(saveMessage) Then
                Return saveMessage
            Else
                cl.LabourProductList.Add(lp)
            End If
        Next
        Return saveMessage
    End Function

George
Telerik team
 answered on 29 Jan 2014
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?