Telerik Forums
UI for WinForms Forum
2 answers
262 views
I am creating windows application with C# that requires to work with 2-3 users.The admin user should get
all the rights to access all forms and can do activity such as retreive data,insert, update and delete.wherein other
users should not get all the access.how do I disable controls that r updating data in database for other users.
can anyone brief me on this?
thanks in advance
erwin
Top achievements
Rank 1
Veteran
Iron
 answered on 01 Aug 2011
1 answer
420 views
hi, i have looked at the other posts regarding validation and your validation video. i do understand the row_validation and cell_validation events. However, in order to validate the entries AND mark the errors, i have to use the validation code twice which i dont want to do.  

My test code is shown below. Have also attached a screenshot.

Here's what i am trying to do:

in the grid2_RowValidating event i am validating and preventing user to go to next row. i would like to "mark/color" the cell with the error. I tried all the Style properties but only the forecolor works. (i have commented the lines not working)

So, in addition to RowValidating event, i decided to use the grid2_ViewCellFormatting event to validate and color the cell with the error.
This is working but i dont understand why i have to validate twice. (once in the RowValidating event to prevent them to go to the next row and again in the ViewCellFormatting event to "color" the cell) 

Am i doing something wrong? Why am i not able to set the Style Properties directly from within the RowValidating. I am using the Q2 2011 version (latest) 

Private Sub grid2_RowValidating(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowValidatingEventArgs) Handles grid2.RowValidating
    If TypeOf e.Row Is GridViewNewRowInfo Or TypeOf e.Row Is GridViewDataRowInfo Then
        If Not e.Row Is Nothing Then
                              
            Dim value As String = e.Row.Cells(1).Value
            If value > 10 Then
                e.Cancel = True
                e.Row.Cells(1).ErrorText = "cannot be greater than 10"
                e.Row.ErrorText = "cannot be greater than 10"
                e.Row.Cells(1).Style.ForeColor = Color.Red
                'These did not work so had to use the cell formating
                'e.Row.Cells(1).Style.DrawFill = True
                'e.Row.Cells(1).Style.NumberOfColors = 1
                'e.Row.Cells(1).Style.BackColor = Color.Peru
 
                'e.Row.Cells(1).Style.DrawBorder = True
                'e.Row.Cells(1).Style.BorderWidth = 2
            Else
                e.Row.ErrorText = String.Empty
            End If
        End If
    End If
 
 
End Sub
 
Private Sub grid2_ViewCellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles grid2.ViewCellFormatting
    If grid2.IsInEditMode Then
 
        If TypeOf e.Row Is GridViewRowInfo Then
 
            Select Case e.ColumnIndex
                Case 1
                    e.CellElement.DrawFill = True
                    e.CellElement.NumberOfColors = 1
 
                    'validate again?? to set the coloring?
                    If e.CellElement.Value > 10 Then
                        'set visual clue
                        e.CellElement.BackColor = Color.Peru
                        e.CellElement.ForeColor = Color.Yellow
                        e.CellElement.Image = My.Resources._error
                    Else
                        'reset all
                        e.CellElement.BackColor = Color.White
                        e.CellElement.ForeColor = Color.Black
                        e.CellElement.Image = Nothing
                    End If
            End Select
 
        End If
    End If
End Sub
 
Jack
Telerik team
 answered on 01 Aug 2011
5 answers
265 views
I'm currently using a multiselect enabled dropdownlist.  How do I retreive the list of 'selected' items in the multiselect dropdownlist?

Thanks.
Jack
Telerik team
 answered on 01 Aug 2011
1 answer
78 views
I'm new to Telerik controls so I'm hopeful there maybe a solution to my problem but searching the documentation and forums I have yet to see it.

Problem
A typical usability problem with menus I frequently see is a menu or sub-menu (grouping of menu items beneath another menu) that instantly disappears if the user mouses over the wrong pixel while trying to mouse over to the menu item.  This can be frustrating causing the user to have to retrace their steps to once again reveal the menu and this time carefully tip-toe the mouse back through the narrow parameters allowed them so as not to trip the code just waiting to remove their destination.

Solution
This is a fairly simple problem technically which requires the library author to allow from some time delay before hiding the menu.  The logic would go something like (pseudo code):

OnMouseOverNonMenu
Start Timer

OnMouseOverMenu
     Stop Timer

OnTimerElapsed
      Hide menu
 

Summary
So far, I have not seen this solution being build into the Telerik menu though it seems like a perfect place for this solution.  Did I miss it? Is there a way to do this without me rolling my own menu control?

thanks,
Eric

Jack
Telerik team
 answered on 01 Aug 2011
3 answers
143 views
Hi,

I'm just switching the last Controls from PanelBar to PageView. In some case I'm using the ExplorerBar-View. But why are newest Elements on Top? I'm adding the Pages programmatically and it adds the Pages always on top. How can I avoid this?

And: how can I change the position of programmatically added Controls? All new controls appears in the upper left corner.

Thank you!
Andy
Stefan
Telerik team
 answered on 01 Aug 2011
2 answers
189 views
I'm trying to figure out how to have a row change color and then fade back to its original color after some predetermined amount of time (like 1 second). I found this example online but can't make it fit for my situation.

http://www.telerik.com/support/kb/winforms/buttons/create-button-with-animated-border.aspx

Any input in the matter would be appreciated.

Why I'm trying to do this (in case you're interested):
I have a piece of hardware that is scanning items that are represented on the screen in the grid. As the scanner picks up an item, I'd like it to "flash" to show the user that the scanner sees it.

Thanks,
Jason
Jason
Top achievements
Rank 1
 answered on 29 Jul 2011
2 answers
83 views
Hi,

I'm migrating from the obsolete PanelBar Control and need a Scrollbar like in ExplorerBar mode, but with just one open Page. I can't find any Method to programatically expand or collapse Pages.

Andy suggestion?

Thanks
Andy
Stefan
Telerik team
 answered on 29 Jul 2011
5 answers
106 views
I updated to the today to 2011.2.11.72 and my Solution Explorer is now showing a temporary key file called testenv1_TemporaryKey.pfx. Do I have to be concerned - how is that changed.
Karl
Erjan Gavalji
Telerik team
 answered on 29 Jul 2011
1 answer
187 views
Hi. I have WinForm Q1 2011.
I have a RadListControl and I fill it from a table in a database,
when a item is to large, dont appears the horizontal scroll bar.
however, if I put a long row from the design view, the horizontal scrollbar is added.
I have tried several things but nothing works, I hope your answer thanks.

lstAreasDisponibles
(listControl) properties :
  •    autoscroll = true
  • fitItemSize = false
  • AutoSizeItems = true

This function fills the listControl.

private void cargarDatosListAreaDisponible()
        {
            string query = "SELECT Vista_Cat_Adscripcion_SIRH.Indice, Vista_Cat_Adscripcion_SIRH.Nombre " +
                            "FROM Vista_Cat_Adscripcion_SIRH INNER JOIN " +
                            "  Vehiculos ON Vista_Cat_Adscripcion_SIRH.Indice = Vehiculos.IdArea " +
                            "GROUP BY Vista_Cat_Adscripcion_SIRH.Indice, Vista_Cat_Adscripcion_SIRH.Nombre, " +
                            "  Vehiculos.Status " +
                            "HAVING Vehiculos.Status = '1' "+
                            "ORDER BY Vista_Cat_Adscripcion_SIRH.Nombre";
 
            Query obj = new Query();
            DataTable dt = obj.obtenerSelect(query);
 
            string[,] datos = new string[dt.Rows.Count, dt.Columns.Count];
 
            for (int fila = 0; fila < dt.Rows.Count; fila++)
            {
                RadListDataItem rldi = new RadListDataItem();
                rldi.TextWrap = true;
                rldi.Text = dt.Rows[fila][1].ToString();
                lstAreasDisponibles.Items.Add(rldi);
            }
        }
Stefan
Telerik team
 answered on 29 Jul 2011
0 answers
81 views
hello

Iam using a RadGridView in my WPF project which has only one column when the width of the column is set to " * " the grids width exceeds the containers width this causes the Container to be streched. but if the * is removed the grid is not getting filled inside the container

Thanks 
Jagan 
Jagadeesh
Top achievements
Rank 1
 asked on 29 Jul 2011
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?