Telerik Forums
UI for WinForms Forum
12 answers
303 views
Hi

Let me know any way to handle following situation...

I have a radgridview (haveing Binding Source) with five columns,One of them is "Posted" which has 'Yes' and 'No' values only...

If value of "Posted" is 'Yes' then that perticular row should be disabled.....(otherwise row should  Enabled)

Please suggest me any Solution..

Thank You

Stefan
Telerik team
 answered on 02 Mar 2011
3 answers
243 views
Hi,

my name is Patrick and i just bought Telerik Premium Collection for .NET.
I've searched the forums and documentation but could not found any answer for my simple problem;(

So here is my question:
how do i get the FULL value of my Filter in RadGrid?

My Code:

private void rgCustomer_FilterChanging(object sender, GridViewCollectionChangingEventArgs e)
        {
            if (e.NewItems.Count > 0)
            {
                FilterDescriptor desc = e.NewItems[0] as FilterDescriptor;
                if (desc != null)
                {
                    if (desc.Value.ToString().Length < 3)
                        e.Cancel = true;
                }
 
            }
             
        }
The Problem is: desc.Value only returns the current letter i've typed.
Example: if i enter "test" -> desc.Value is "t"

thx for help
Emanuel Varga
Top achievements
Rank 1
 answered on 02 Mar 2011
3 answers
187 views
Hi,
    I wanna set the zoom pronperty for radform. I tried with much coding but not uniformly applying. Can u suggest me anything?
Richard Slade
Top achievements
Rank 2
 answered on 02 Mar 2011
5 answers
213 views
Hi,

I search the forum for a solution on this but without finding any answer on it.
I have a multicolumn dropdownlist in my grid.
I use a customized Editor (found in one of the threads here) to show the data.
But when i click on one row, i want the list to disappear and the value to be set in the cell.

And how can i show only the two last columns ( not the ID field) ?
And how can i remove the header row? 

 Here is the testcode i use:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
namespace TestRadGrid
{
    public partial class Form1 : Form
    {
        List<RowHelper> rows = new List<RowHelper>();
        public Form1()
        {
            InitializeComponent();
            Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn1 = new Telerik.WinControls.UI.GridViewDecimalColumn();
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
            Telerik.WinControls.UI.GridViewComboBoxColumn gridViewComboBoxColumn1 = new Telerik.WinControls.UI.GridViewComboBoxColumn();
            Telerik.WinControls.UI.GridViewMultiComboBoxColumn gridViewComboBoxColumn2 = new Telerik.WinControls.UI.GridViewMultiComboBoxColumn();
 
             
            rows.Add(new RowHelper(1, "Row1", 1));
            rows.Add(new RowHelper(2, "Row2", 2));
            rows.Add(new RowHelper(3, "Row3", 3));
            rows.Add(new RowHelper(4, "Row4", 1));
 
 
            List<helper> list = new List<helper>();
            list.Add(new helper(1, "test1"));
            list.Add(new helper(2, "test2"));
            list.Add(new helper(3, "test3"));
 
            List<multicolumnhelper> multicolumnlist = new List<multicolumnhelper>();
            multicolumnlist.Add(new multicolumnhelper(1, "test1","col2"));
            multicolumnlist.Add(new multicolumnhelper(2, "test2", "col2"));
            multicolumnlist.Add(new multicolumnhelper(3, "test3", "col2"));
 
            gridViewComboBoxColumn1.DataSource = list;
            gridViewComboBoxColumn1.DisplayMember = "Value";
            gridViewComboBoxColumn1.ValueMember = "ID";
            gridViewComboBoxColumn1.HeaderText = "Test";
            gridViewComboBoxColumn1.Name = "test";
            gridViewComboBoxColumn1.FieldName = "RowID";
 
            gridViewTextBoxColumn1.Name ="rowtext";
            gridViewTextBoxColumn1.HeaderText ="rowtext";
            gridViewTextBoxColumn1.FieldName = "RowText";
 
 
            gridViewComboBoxColumn2.DataSource = multicolumnlist;
            gridViewComboBoxColumn2.DisplayMember = "Value";
            gridViewComboBoxColumn2.ValueMember = "ID";
            gridViewComboBoxColumn2.HeaderText = "Test";
            gridViewComboBoxColumn2.Name = "test2";
            gridViewComboBoxColumn2.FieldName = "RowID";
            radGridView1.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {gridViewComboBoxColumn1, gridViewTextBoxColumn1, gridViewComboBoxColumn2});
 
            PopulateData();
 
        }
        private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
        }
        private void PopulateData()
        {
 
            radGridView1.DataSource = rows;
 
        }
 
        private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
        {
            if (e.EditorType == typeof(RadMultiColumnComboBoxElement))
            {
 
                MyRadMultiColumnComboBoxElement editor = new MyRadMultiColumnComboBoxElement();
                e.Editor = editor;
            }
        }
 
    }
 
    public class helper
    {
        public helper(int id, string value)
        {
            ID = id;
            Value = value;
        }
 
        public int ID { get; set; }
        public string Value { get; set; }
    }
 
    public class multicolumnhelper
    {
        public multicolumnhelper(int id, string value, string value2)
        {
            ID = id;
            Value = value;
            Value2 = value2;
        }
 
        public int ID { get; set; }
        public string Value { get; set; }
        public string Value2 { get; set; }
     
     
     
    }
    public class RowHelper
    {
        public RowHelper(int id, string text, int id2)
        {
            RowID = id;
            RowText = text;
            RowID2 = id2;
        }
 
        public int RowID { get; set; }
        public string RowText { get; set; }
        public int RowID2 { get; set; }
 
 
    }
 
    public class MyRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement
    {
        public MyRadMultiColumnComboBoxElement()
        {
            this.DropDownWidth = 200;
        }
 
        protected override RadPopupControlBase CreatePopupForm()
        {
            RadPopupControlBase popup = new MyMultiColumnComboPopupForm(this);
            return popup;
        }
 
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(RadComboBoxElement);
            }
        }
    }
 
    public class MyMultiColumnComboPopupForm : MultiColumnComboPopupForm
    {
        public MyMultiColumnComboPopupForm(PopupEditorBaseElement owner)
            : base(owner)
        {
 
        }
 
        public override string ThemeClassName
        {
            get
            {
                return typeof(MultiColumnComboPopupForm).FullName;
            }
            set
            {
 
            }
        }
 
        public override void ShowPopup(Rectangle alignmentRectangle)
        {
            int delta = alignmentRectangle.Width - this.Size.Width;
 
            if (delta > 0)
            {
                alignmentRectangle.X += delta;
                alignmentRectangle.Width -= delta;
            }
 
            base.ShowPopup(alignmentRectangle);
        }
    }
}
Richard Slade
Top achievements
Rank 2
 answered on 02 Mar 2011
2 answers
229 views
Hi,

is there any way to hide these up-and-down-Arrows from the RadPanelBarElements? Thank you!

Andy
n/a
Top achievements
Rank 1
 answered on 02 Mar 2011
8 answers
263 views
Hi,

I have a problem in RadPageView. If I click twise on the Strip Button to view the hidden pages, surprisingly context is menu is loading twise in the same. I found the same problem in "Run Demo" application also.

Find the attached screen shot for clear understangin of the problem. Please provide any information to solve this issue.


Thanks
vijay

Richard Slade
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
152 views
How do I validate existing record in radgrid. if some one enter data into grid if he duplicate the data how do i validate it
Emanuel Varga
Top achievements
Rank 1
 answered on 02 Mar 2011
7 answers
246 views
I am creating a small application using the RadGridview for Silverlight which validates whether a group of cells in the same row summ to one.  if they do not sum to on then validation for the row fails.  I am attempting to  set the focus to the first cell of the group which fails validation using the below code:

private void gvRiskMetrics_RowValidating(object sender, Telerik.Windows.Controls.GridViewRowValidatingEventArgs e)
        {
            RMSectorWeightEnt SectorWeightENT = e.Row.DataContext as RMSectorWeightEnt;
            List<double?> GroupSums = checkGroupSums(SectorWeightENT);
            int isum = 0;
            foreach (double sum in GroupSums)
            {
                if (sum != 1)
                {
                   
                   
                    GridViewCellValidationResult validationResult = new GridViewCellValidationResult();
                    validationResult.PropertyName = "Sums";
                    validationResult.ErrorMessage = "Sum must be equal to 1";
                    e.ValidationResults.Add(validationResult);
                    
                    e.IsValid = false;
                
                  
  int Index = gvRiskMetrics.SelectedItems.IndexOf(gvRiskMetrics.SelectedItem);
               var item = gvRiskMetrics.Items[Index];
                  var column = gvRiskMetrics.Columns[m_GroupItemsIndex[isum]];
                   gvRiskMetrics.ScrollIntoView(item, column);
          var cellinfo = new GridViewCellInfo(item, column, gvRiskMetrics);
                gvRiskMetrics.CurrentCellInfo = currentCell;
                   gvRiskMetrics.BeginEdit();

                    
                }
                isum++;
            }
            
        }

Apparently this won't work since every time the current cell info is updated the the RowValidating event is called and the application essentially goes into an infinite loop.  Do you have any suggestions?  One other thing here is this behaviour does not occur on the first item in the Gridview collection(Row 1).
Stephen
Top achievements
Rank 2
 answered on 02 Mar 2011
4 answers
238 views
Does the grid support my replacing/removing the Filter operators?

Some column examples:

Total Sales (dollar format)
Replace filter textbox and operators menu with predefined options of "< 1 Million", "1 to 10 Million", "11 to 50 Million", and "> 50 Million".

Category (text but business rules only allow 3 categories)
So replace filter textbox and operators menu with the 3 categories, e.g. "Fruit", "Bread", "Meat"

Martin Vasilev
Telerik team
 answered on 01 Mar 2011
15 answers
1.9K+ views
Hi All

I need to dynamically add  DataGridViewComboBoxCell in telerik datagridview but I could not do that
is there any way to add such cells dynamically?

thanks

 

Martin Vasilev
Telerik team
 answered on 01 Mar 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
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
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
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?