Telerik Forums
UI for WinForms Forum
1 answer
237 views
I have a GridView with a  GridViewDateTimeColumn, and I have managed to figure out how to display no text in the editor when the cell value is null, however I need to also allow the user the  option of setting the value to null if a value exists.

When the pop up editor appears, i cannot see a way to customize the popup or the text editor to allow this to happen.

        private void gvLibrary_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            GridTimePickerEditor editor = e.ActiveEditor as GridTimePickerEditor;
            if (editor != null)
            {
                RadTimePickerElement editorElement = editor.EditorElement as RadTimePickerElement;
                editorElement.Format = "HH:mm:ss";
                editorElement.NullText = "";
                editorElement.NullValue = 0;
                if (e.Value != null)
                {
                    editorElement.Value = e.Value; 
                }
                else
                {
                    ((TextBox)(editorElement.MaskedEditBox.TextBoxItem.TextBoxControl)).Text = "";
                }
            }
        }

Can you provide me with the necessary elements to allow the user to delete values in the text box or from the pop-up and a way to ensure that the editor's null value is passed to the grid cell?

Thank you,

Vania

George
Telerik team
 answered on 09 Aug 2013
5 answers
485 views
Hi i navigate RadGrid view using following code

Private Sub DOCFirstDtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DOCFirstDtn.Click
     If DocumentsGV.Rows.Count > 0 Then
         DocumentsGV.Rows(0).IsSelected = True
         DocPreviousBtn.Enabled = False
         DocNextBtn.Enabled = True
     End If
 End Sub
 Private Sub DocLastBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DocLastBtn.Click
     If DocumentsGV.Rows.Count > 0 Then
         DocumentsGV.Rows(DocumentsGV.Rows.Count - 1).IsSelected = True
         DocNextBtn.Enabled = False
         DocPreviousBtn.Enabled = True
     End If
 End Sub
 Private Sub DocPreviousBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DocPreviousBtn.Click
     If DocumentsGV.Rows.Count > 0 Then
         Dim SelectedRowIndex As Integer = DocumentsGV.SelectedRows(0).Index
         If SelectedRowIndex = 1 Then
             DocPreviousBtn.Enabled = False
         Else
             DocPreviousBtn.Enabled = True
         End If
         DocNextBtn.Enabled = True
         DocumentsGV.Rows(SelectedRowIndex - 1).IsSelected = True
     End If
 End Sub
 Private Sub DocNextBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DocNextBtn.Click
     If DocumentsGV.Rows.Count > 0 Then
        
         Dim SelectedRowIndex As Integer = DocumentsGV.SelectedRows(0).Index
         Dim vvv As Integer = DocumentsGV.SelectedRows.Count
         If SelectedRowIndex = (DocumentsGV.Rows.Count - 2) Then
             DocNextBtn.Enabled = False
         Else
             DocNextBtn.Enabled = True
         End If
         DocPreviousBtn.Enabled = True
         DocumentsGV.Rows(SelectedRowIndex + 1).IsSelected = True
     End If
 End Sub

but if i group RadGrid then the Selected index of RadGrid does not change
if i change also still hold the previousSelected index
how to solve this
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Aug 2013
7 answers
343 views
Is there a way to create a ListView in which one of the columns is an image column (this is, a column in which to show an image)?. I would like also to be able to turn the visibility of the images on and off. Thank you!

Joaquín
Anton
Telerik team
 answered on 09 Aug 2013
2 answers
123 views
I'm currently evaluating Telerik Winforms controls for a project (specifically, the GridView).  I downloaded the installer yesterday so I believe I'm using the most recent version (RadControlsForWinFormsSetup_2013_2_724).  Everything is working fine except the TextAlignment on GridViewHyperlinkColumns.  I found an old forum post about this issue:

http://www.telerik.com/community/forums/winforms/gridview/gridviewhyperlinkcolumn-ignoring-textalignment-bug.aspx

I tried the workaround posted but it didn't work.  After some research, I found this page:

http://www.telerik.com/releasehistory.aspx?id=523

Which states the bug was fixed back in the "RadControls for WinForms 2012.3 1017 Oct 17, 2012" release.  However, I'm seeing the bug as described in the old forum post.  Here's a sample of the data bound to a text box and then bound to a hyper-link column, both with TextAlignment set to MiddleLeft:

http://imageshack.us/photo/my-images/818/yk3m.png/

Is this a regression issue?  Is there a work-around for this?  The workaround posted in the original thread no longer works.

Thanks.
Patrick
Top achievements
Rank 1
 answered on 09 Aug 2013
1 answer
162 views
I have a  rad grid which i am populating on from the context ie .


          BindingSource bs = new BindingSource();
            bs.DataSource = pamsContext.GetAppraisal(false).ToList();
            grvappraisal.DataSource = bs;

I have a list which contains apprisal id record id , next date  , apprisaed by

on the right on the same form I have notes and a couple of date drop down what I am wanting to no is using the entity frame work how do i store the values on the right hand side so I can later save them to the entity.

any help is appreciated 
George
Telerik team
 answered on 09 Aug 2013
3 answers
150 views
Hello, everybody.
Sounds strange, but i can't find event of maximisation button of radform.
I need to resize form content and i can't do it in maximisation mode. I created special method for resizing and it works when i resize form slowly by getting corner, but resizing events don't work after maximizing((
Who knows how to solve this issue?
Andrey Kipetcoff
Top achievements
Rank 1
 answered on 08 Aug 2013
2 answers
397 views

I have a List called “myResults”. When the list contains at least one item, I’m trying to populate a GridView w/ info for the list; the GridView is called “gvMyResults”. However, sometimes, during this update of the DataSource, I get an exception saying, “Bounds cannot be changed while locked”, and a red X is displayed across my GridView. I added this Dispatcher wrapper around my update, but I’m still seeing the same error. It’s difficult to troubleshoot, because it does not happen every time. Does anyone know how to stop this “bounds cannot be changed while locked” error?

I have tried to fix this two ways, but both still give the error. 

First attempt:

Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
    this.gvMyResults.DataSource = myResults;
});

Second attempt:

_Context.Send(x =>
{
    this.gvMyResults.DataSource = myResults;
}, null);
Tim
Top achievements
Rank 1
 answered on 08 Aug 2013
2 answers
204 views
Hi,
I use raddock and as you know when show a form it becomes a tab in raddock.
these tabs(forms) have ContextMenu that show when right click on forms header
 that contains close , close all , close all but this  and other menu items
i need to add image for this menu items
how can i do that?
Mahvash
Top achievements
Rank 1
 answered on 07 Aug 2013
1 answer
128 views
Is it possible for a user to type a non-date value (e.g. [EMPTY]) in the DateTimePicker? I tried everything I could think of, but it always formats the first bracket to a date value.
Dimitar
Telerik team
 answered on 07 Aug 2013
2 answers
212 views
Version: 2013.2.612.20
I noticed a strange behavior when trying to change the column width.
Just copy and paste the code below to get the same environment.

Hold the line between columns and move the cursor to the left a little. The first column will reduce its width inappropriately. The cursor remains in the correct position.

The result can be seen in the attached files before.png and after.png.

private void Form1_Load(object sender, EventArgs e)
{
GridViewTextBoxColumn col1 = new GridViewTextBoxColumn();
col1.HeaderText = "Stretch1";
    col1.MinWidth = 100;
    col1.Width = 200;
 
    GridViewTextBoxColumn col2 = new GridViewTextBoxColumn();
    col2.HeaderText = "Stretch2";
    col2.MinWidth = 100;
    col2.Width = 200;
 
    GridViewTextBoxColumn col3 = new GridViewTextBoxColumn();
    col3.HeaderText = "Static";
    col3.MaxWidth = 200;
    col3.MinWidth = 200;
    col3.Width = 200;
 
Telerik.WinControls.UI.RadGridView grid = new RadGridView();
grid.Location = new Point(0, 0);
grid.Size = new System.Drawing.Size(600, 100);
    grid.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            
    grid.MasterTemplate.Columns.AddRange(new GridViewDataColumn[] { col1, col2, col3});
 
    Controls.Add(grid);
}
konrad
Top achievements
Rank 1
 answered on 07 Aug 2013
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?