Telerik Forums
UI for WinForms Forum
2 answers
796 views
I have a radGridView on a form which has cell and row validation implemented. No problem with that, works well.

The problem arises when I leave a row incomplete and then click on the Save button elsewhere on the form. The RowValidating code snippet below does not work, because once the focus moves away from the GridView to the Save button, the 'if (row != null)' check always returns false, and the RowValidating code is never executed.

private void radGridView1_RowValidating(object sender, RowValidatingEventArgs e)
    {
        var row = e.Row as GridViewDataRowInfo;
 
        if (row != null)
        {
            var value = row.Cells["cboUnit"].Value.ToString();
            if (string.IsNullOrEmpty(value))
            {
                e.Cancel = true;
                row.ErrorText = "Unit Number is a required field";
            }
 
            else
            {
                row.ErrorText = string.Empty;
            }
     }
}


How can I retain focus in the grid to ensure that the entire grid validates before allowing the user to leave the grid?
Peter
Top achievements
Rank 1
 answered on 21 Feb 2014
2 answers
113 views
I see in the examples application that row details can be used for editing.

Specifically, it says "Row Details can also be used for providing a more convenient editing environment for the end user."

I can't find any documentation, examples, videos or posts about this functionality though. Has anyone used this or know where to find information on it?

Thanks.
George
Telerik team
 answered on 21 Feb 2014
1 answer
148 views
Hello,

I am trying to format a cell. I am returning a Boolean value and instead of displaying a true or false in the cell I want to display a 1 for true and a 0 for false. I have this in the cell formatting event and I have two columns, the first returns the true/false value which I am reading and then displaying the 1,0 in another column. It works fin when the true/false column is visible but when I hide it I do not see the 1,0 in the other column.

Here is what I have:
​ //Cell formatting for start bit visual indication. The Start column has been hidden.
if (e.CellElement.ColumnInfo.HeaderText == "Start")
{
if ((bool)e.CellElement.RowInfo.Cells["Start"].Value == true)
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "1";
}
else
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "0";
}
}


Can this be done in the expression editor for the true/false column or what is the best way to achieve this.

Thank you,

chom
Dimitar
Telerik team
 answered on 21 Feb 2014
3 answers
134 views
I am trying to add a page programatically and I am unable to see newly added page.

However, I have noticed the PageIndex is increasing.

The following is the code:

Telerik.WinControls.UI.RadPageViewPage page1= new Telerik.WinControls.UI.RadPageViewPage();

page1.Text = "Search";

RadPageView1.Pages.Add(page1);


What I found is Page1 visible property is set to false.

Can anyone help me on this.

Thanks
Charan.
Stefan
Telerik team
 answered on 21 Feb 2014
1 answer
89 views
Hi,
i want to know how can i retrieve values of edit recurrence form after i press button ok in edit appointment form
 to reflect in radscheduler and save values of recurrence form in sql db
Dimitar
Telerik team
 answered on 20 Feb 2014
1 answer
238 views
We have a problem about the ‘RadRepeatButton’ on the touchscreen computer. We have tried the ‘repeat button application’ under the ‘buttons’ tab in the ‘Demo Applicaion – RadControls for WinForms Q3 2013’ on Windows 8 but the button works only when we double tap. When we tried the same application on Windows 7 the button works properly as soon as we tap on it. Does the ‘Rad RepeatButton’ not work on Windows 8? Or does this button works when you double tap on it. We think it should operate when you touch it.

The problem we experience occurs only when we tap on the  touchscreen. Other than that, when we use the mouse, it operates properly on both operating systems.

What can we do in order to make the rad repeat button operate when we tap and hold on it (not double tap) on Windows 8?
George
Telerik team
 answered on 20 Feb 2014
1 answer
144 views
Hello everyone,


I have a little problem with your calculated columns.
I need to get all calculated cells with value less than 0, but when I iterate to get the values < 0 I get fewer results. I guess is something related to the moment when is refreshed the calculated value. 

how can I get the count of cells with value < 0

right now I am making a linq query like this:

grid.Rows.OfType<GridViewDataRowInfo>().Count(x => Convert.ToDouble(x.Cells["columnName"].Value) <= 0);

but I get only 5 results. It seems that the refresh event of the calculated cells is fired when I scroll down, is that correct? can I force the program to calculate all of them?

thanks :)
George
Telerik team
 answered on 20 Feb 2014
4 answers
102 views
Hi i have a problem when i assign null to SelectedValue.

I have pictures in each of the control elements and when changing the value works perfectly. If you do not select anything right also works. The problem is when after having selected a value image, try to allocate a null control and I changed the text but the image remains.

I have tried:
this.DropDownList.SelectedItem = null;

and:
this.DropDownList.SelectedValue = null;

And not working properly.

Thanks, Regards.
George
Telerik team
 answered on 20 Feb 2014
4 answers
421 views
Hello there :)

First of all, this is my first time using Telerik and I`m loving it so far. :D

I`m trying to change the font size of some labels, and I need to do it runtime, after applying the initial theme. I have tried label.Font = new Font(labelFont.Name, 20f, FontStyle.Regular); and label.LabelElement.Font = new Font(labelFont.Name, 20f, FontStyle.Regular); none of them work. The function does get called, the font does get changed in memory, checked it with a breakpoint. How would I go about this?
Stefan
Telerik team
 answered on 20 Feb 2014
5 answers
536 views
Hi all,

I wondered if it was possible to use a virtual treeview, like in a gridview. There the option VirtualMode indicates that you implement you own data management routines, rather than adding items once... I expect to have a tree view with a lot of items, but I don't want them to be loaded at once (for performance reasons).

Does anyone have and idea?

Regards,
C.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 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)
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?