Telerik Forums
UI for WinForms Forum
7 answers
190 views
Hello Telerik

I have a little issue on adding row to a gridview using a objectquery(Of T) as datasource. The gridview is groupped on two level (fixed by design). Rows are added programmatically on a button click event with the following code.

Private Sub AddNew_Click(sender As System.Object, e As System.EventArgs) Handles AddNew.Click
        Try
            'Add a new row
            Dim newrow As GridViewRowInfo = Me.NotesFrais.Rows.AddNew()
 
            'Set default value on the new data object
            Dim newnotedefrais As NoteFrais = CType(newrow.DataBoundItem, NoteFrais)
 
            With newnotedefrais
                .DateCreation = Today.Date
 
                Dim currentuserguid As Guid = GetCurrentUser.Guid
                Dim currentcollaborateur As Collaborateur = Me._datactx.Collaborateur.Single(Function(c) c.AD_Guid.Equals(currentuserguid))
                .Collaborateur = currentcollaborateur
 
                .IsTemporaire = True
            End With
 
            'Update the database
            Me._datactx.SaveChanges()
 
            'Select the new row
            newrow.EnsureVisible(True)
            newrow.IsSelected = True
            newrow.IsExpanded = True
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Une erreur est survenue..")
        End Try
    End Sub

The issue is that's the EnsureVisible do not expend the good group (on the yellow one on the picture).  If the "good" group is expended before the sub, all is goning fine (EnsureVisible do not expand the wrong group).

Hristo
Telerik team
 answered on 15 Jan 2015
1 answer
197 views
I have a radGridView (2014.2.715.40) component having among others 2 checkbox columns.  One is named "IsConcilie" and the other one is "IsRetenu".  For each row, when 1 of these columns is true, we can't set the other one to true.  Only one of these 2 columns may be true at a time.  If the user tries to put the second to true, he is advised.  The radGridView is named "MasterTemplate".

Because I want to be able to cancel the action, I added this event handler:
this.MasterTemplate.ValueChanging += new ValueChangingEventHandler(MasterTemplate_ValueChanging);

Then I coded the following:

void MasterTemplate_ValueChanging(object sender, ValueChangingEventArgs e)
{
    GridDataCellElement ce = this.MasterTemplate.CurrentCell;
    if (ce.Name == "IsConcilie")
    {
           if (e.NewValue.Equals(false)) return;
           if (this.MasterTemplate.CurrentRow.Cells["IsRetenu"].Equals(true))
           {
                MessageBox.Show( "You cannot verify a retained cheque", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                e.Cancel = true;
            }
     }
     if (ce.Name == "IsRetenu")
     {
          if (e.NewValue.Equals(false)) return;
          if (this.MasterTemplate.CurrentRow.Cells["IsConcilie"].Equals(true))
          {
               MessageBox.Show("You cannot retain a verified cheque", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand);
               e.Cancel = true;
           }
      }
}

Unfortunately, whenever we click one of these checkboxes, the event is not fired.  What's wrong?

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jan 2015
8 answers
217 views
I have RadSplitButton with  2 options (2 radMenuItems)
Is it possible to add near to one of my items a RadSpinEditor in order to give the user the option to choose specific value number ?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jan 2015
1 answer
171 views
I have a RadGrid in a form which contains 2 Combobox columns named "ITEMNAME" and "BATCHNO" respectively. I have loaded the first column with values from database. I need to populate the second combobox with values based on the value I choose from the first combobox. Which is the apt event to populate the values in a combo box based on another. If possible post a sample code. That would be useful to me.
Hristo
Telerik team
 answered on 14 Jan 2015
1 answer
124 views
I am creating a self-referencing Hierarchical Grid View. I checked the sample and it is setting image in CellFormatting event by accessing 

GridDataCellElement dataCell = e.CellElement as GridDataCellElement;
...........................................................
dataCell.ImageAlignment = ContentAlignment.MiddleLeft;
dataCell.Image = this.imageList1.Images[2]; 
dataCell.TextImageRelation = TextImageRelation.ImageBeforeText;


I want to attach image at the time of inserting the rows into the grid. How can I do that?

Another related question, how can I know if a row has child rows (nodes)
Hristo
Telerik team
 answered on 13 Jan 2015
15 answers
567 views
I need to create a gridview (winforms) that has two comboboxes where one of the comboboxes' available values are determined by the selection in the first combobox. This seems straightforward but I have run into problems with all the approaches I have tried so far.

I tried the following:
1) In the Cell Value Changed event I tried rebinding the  dependent combobox in the based on the selection in the first. The problem that I encounter is that while the combobox is is rebound with the data I am looking for it rebinds the combobox in all of the rows in the grid blanking out selections whose value is no longer one of the combobox values.

2) I also tried capturing the cell formatting event and adding a new RadComboBoxElement to the cell and populating the the combobox element by adding items to it.  While this does work, the grid's theme doesn't flow through and the grid appears be acting buggy. I've run into a problem when populating this combobox element when it is scrolled off the screen (row isnt visible because the user has to scroll to see it). When part of a row is scrolled off the screen the combobox is painted half in the grid and half on top of the horizantal scroll bar which doesn't look professional. This approach also yields a combobox that has a different look and feel than the other comboboxs in the grid because it doesnt have a distinct edit mode, its always in edit mode, always shows the drop down arrow image.

Is there any way to do this? I need to populate the values of one combobox based on the selection of another combobox in a RadGridView. At this point I'm becoming very frustrated with these components.
Hristo
Telerik team
 answered on 12 Jan 2015
1 answer
221 views
In Q3 2014 control, i can not find the "CanUserFreezeColumns" method in the "RadGridView". I want to show the effect like the demo. 
http://demos.telerik.com/silverlight/#GridView/Scroll

'Telerik.WinControls.UI.RadGridView' does not contain a definition for 'CanUserFreezeColumns' and no extension method 'CanUserFreezeColumns' accepting a first argument of type 'Telerik.WinControls.UI.RadGridView' could be found (are you missing a using directive or an assembly reference?) 


Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
252 views
Hi,

Can you please let me know if the BandedGridView functionality has been implemented in the RadGridView under UI for WinForms.

Attaching an image for your understanding.

Thanks
Revanth
Stefan
Telerik team
 answered on 12 Jan 2015
9 answers
347 views
Hi,
we have check box in header cell of acheck box column and it is working fine for the version (2009.3.9.1203)
when we upgrade the dlls to new version (2010.2.10.713) its not working.

/// Class to Display check box Header cell
    public class CheckBoxHeaderCell : GridHeaderCellElement
    {
    }
I am getting some problem in the above class.

please give the work around for the new dlls.

Thank you,
Shashi


Stefan
Telerik team
 answered on 12 Jan 2015
1 answer
170 views
I'm playing around with the Ribbon bar and have multiple tabs which displays user controls for different sections of the program i'm playing around with. One section is products that is basically a datagrid with add, edit and delete functionality, this is all on a single user control. Normally I'd put the add, edit and update buttons in this user control so the main view doesn't get cluttered with code.

What is the best or most proper way to access the ribbon buttons from a user control?

  

Stefan
Telerik team
 answered on 12 Jan 2015
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?