Telerik Forums
UI for WinForms Forum
1 answer
466 views

In our database tables we have a field isDeleted. This indicates if a record is logically deleted. 

There is a Delete-Button on the form. If the user presses this button, the flag should be set, then the data saved. After that the window is closed and the user gets back to the form with the list. The list is built upon a database view with the where-clause "where IsDeleted = 0".

For editing the data I have a detail data form with a ObjectView. On the form there is a RadCheckbox-Control named cbIsDeleted.
The control is bound via the IsChecked-Property to the persistent data.

  • If I check/uncheck the CheckBox with the mouse and save the data, the changed value is saved in the database.
  • If I want to do the same programmatically, on the GUI the Checkbox will be checked/ unchecked. But when I want to save the data - the changed value for the Checkbox wouldn't be stored in the database: 

 

 

cbIsDeleted.ToggleState =   
Telerik.WinControls.Enumerations.ToggleState.On; 

 

I tried also:

 

cbIsDeleted.Checked = true

What's wrong? Should I set some other properties?

Thanks in advance
Bernhard

Nick
Telerik team
 answered on 04 Nov 2009
1 answer
145 views
Good Evening All

I have got a RadPanelBar docked to the left hand side of my MDI form.  I am trying to nest a RadCallander into this RadPanelBar by just dragging and dropping the RadCallander control from the toolbox as detailed in the Getting started section of the panel on the online help (http://www.telerik.com/help/winforms/panel_gettingstarted.html).  However when i add it it adds it to the form rather than into the PanelBar.

Can anyone please tell me where i am going wrong and how to stop this happening?

Thank you in advnace

Luke Frost
Nikolay
Telerik team
 answered on 04 Nov 2009
1 answer
108 views
I'd like to make a "feature request" to add an option to make the Tab appear even when there's only one ChildGridViewTemplate (i.e. only 1 sibling) on a given level.  This would help clarify what the ChildGridViewTemplate is for.

Telerik WinForms 2009Q3 Beta (2009.2.9.1016) / 2009Q2 (2009.2.9.729), VB, VS 2005 (v8.0.50727.762 SP.050727-7600), .Net 2.0 (2.0.50727), XP SP3, 3GB, 2.99GHZ, Core2Duo.
Jack
Telerik team
 answered on 04 Nov 2009
1 answer
134 views
Hi,
     There are two columns in a grid placed in a windows form. The first column is a GridViewComboBoxColumn and the second one is a GridViewDataColumn. I have populated the combo box with values. I need to assign the selected value from the drop down to the cell on which it resides. The code i have written is given below.

private void BindData()
        {
            radGridView1.GridElement.BeginUpdate();
            var gridViewLookUpColumn = ((GridViewLookUpColumn)(radGridView1.CurrentRow.Cells["column1"].ColumnInfo));

            if (gridViewLookUpColumn == null) return;

            gridViewLookUpColumn.DataSource = FillData();
            gridViewLookUpColumn.DisplayMember = "Name";
            gridViewLookUpColumn.ValueMember = "Id";
            gridViewLookUpColumn.DropDownStyle = RadDropDownStyle.DropDownList;

            radGridView1.GridElement.EndUpdate();
        }

        private static DataTable FillData()
        {
            var dt = new DataTable();
            dt.Columns.Add(new DataColumn("Name", typeof(String)));
            dt.Columns.Add(new DataColumn("Id", typeof(Int32)));

            var dr = dt.NewRow();
            dr["Name"] = "Test 1";
            dr["Id"] = 1;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Name"] = "Test 2";
            dr["Id"] = "2";
            dt.Rows.Add(dr);
            return dt;
        }

 private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            BindData();
        }

        private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            try
            {
                var radEditor = radGridView1.ActiveEditor;

                if (radEditor == null) return;
                switch (radEditor.GetType().Name)
                {
                    case "RadComboBoxEditor":
                        {

                            var element = ((RadComboBoxElement)((RadComboBoxEditor)radGridView1.ActiveEditor).EditorElement);
                           
                            if (element == null) return;
                            var selectedText = ((RadComboBoxItem) element.SelectedItem).Text;
                            MessageBox.Show("Begin" + selectedText);

                            radGridView1.CurrentRow.Cells["column1"].CellElement.Text = selectedText;
                            //radGridView1.Rows[e.RowIndex + 1].Cells[e.ColumnIndex + 1].Value = element.SelectedValue;                                
                            break;
                        }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }


I can select the value from the dropdown. But the value assigned to the cell is not displaying. Please help me.

Regards
Shamjith


Jack
Telerik team
 answered on 04 Nov 2009
1 answer
98 views
I my application I have a need to basically merge 2 rows.
So I am using the HtmlViewDefinition to do so.
It all is working great but I want to remove some of the column headers as they are all kind of duplicate(by design) per the data.

The view istructured like this:
 HtmlViewDefinition view = new HtmlViewDefinition();  
 
              view.RowTemplate.Rows.Add(new RowDefinition());  
              view.RowTemplate.Rows.Add(new RowDefinition());  
              view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Code_V1"));  
              view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Name_V1"));  
              view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Code_V2"));  
              view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Name_V2"));  
 
              this.gvMembers.ViewDefinition = view; 

So the header basically looks like this:

Code_V1        Name_V1
Code_V2        Name_V2

But I want it to look like this:
Code        Name


So I would like to remove the second "row" of the header". 
Or if that is not possible, can I make the height be smaller to basically hide the second row. 
I am not usre how to do either. 
Any ideas os suggestions would be appreciated..

--Chuck
Jack
Telerik team
 answered on 04 Nov 2009
1 answer
118 views
hi,
in the product specs it is mentioned that it supports RTL:


Right-to-left Language and Localization Support

Due to business globalization, the need for multi-lingual applications is a must. Telerik WinForms Dock supports all RTL languages, such as Hebrew and Arabic. RadDock's window captions, drop-down menus and action buttons (close, pin/unpin, etc) are fully localizable through a simple and intuitive localization provider, or through resources.

I tried a few ways but couldn't make it work.
i need it to support hebrew.
I'm using Q2 2009.
please advice.

thanks,
Idan
Julian Benkov
Telerik team
 answered on 04 Nov 2009
3 answers
122 views
There's a "Copy" Option that's Visible and Enabled in the default ContextMenu but it doesn't seem to do anything.  If there's no default behavior when you select it, then it shouldn't be in the default ContextMenu at all.  If users want a Copy option, they can customize / replace the ContextMenu.

I don't see any Event that might be triggered by it.  If there's an Override-able Method it calls, as usual, it's doesn't seem to be documented.

FYI, I thought a good use for it would be to do the same thing that the following KB article implements for the Ctrl-C key (namely copying the CurrentRow's Cells, delimited by Tab's and terminated by a Line Feed, to the Clipboard).  I overrode it's handler to do so.

http://www.telerik.com/support/kb/winforms/gridview/copy-pasting-rows-in-and-between-radgridviews-csv-format.aspx

Telerik WinForms 2009Q2 (2009.2.9.729), VB, .Net 2.0 (2.0.50727), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3, Core2Duo 2.99GHZ with 3GB.
Nick
Telerik team
 answered on 04 Nov 2009
1 answer
160 views
Can a split container be set to automatically fill a form's area or does it have to be done programatically?

Found it.  .Dock = DockStyle.Fill
Nick
Telerik team
 answered on 04 Nov 2009
3 answers
139 views
Hi there,

this is my first post here, mainly because until now i have not had any real issues with the controls. 

Controls in Use: Rad Controls For Win Forms, Q1 2008

For my current project i need several Split Button elements on the Ribbon bar.

Normally, not an issue. But Now i am trying to edit the visual Look of them via the 'Edit UI Elements'. Once i make the changes , the visual design is applied at design time. However, once i run my application the control reverts to a OuterInnerBorder state which is not what i am wanting. I want a SingleBorder persisted on the control.

This problem is with all instances of the Split button, and Drop Down Button elements for the Ribbon bar.

I am also editing the size of the Fill Primitives, these too are not persisting the changes i am making once i run my application.

Any one have any ideas as to why this may be???????

Thanks in advance for your replies.

Oh as a side not, the ribbon bar chunk is showing the same behaviors. I turn off Auto Size, and manually define them for some of the chunks (Trying to keep the height the same across all chunks and tabs. Width and height settings are not being maintained on the bar chunks)
Hobbes
Top achievements
Rank 1
 answered on 03 Nov 2009
3 answers
388 views
Hello,
I am using GridViewSummaryRowItem and i found it very useful so far. However I have problem with adding custom format (color, border) to the total row. In examples there is code snippet that uses  cell formatting event to do so:

  if (e.CellElement is GridSummaryCellElement) 
            { 
 //Set formatting... 
            } 


But my GridView doesn't fire either cellfromatting or rowformatting event for the total row, so I have no way how for example set custom background color. Here's my code to setup the total row:

     
      GridViewSummaryRowItem sum = new GridViewSummaryRowItem(); 
            sum.Add(new GridViewSummaryItem("CeleJmeno""Celkem", GridAggregateFunction.None)); 
            sum.Add(new GridViewSummaryItem("Preplatek""{0:C}", GridAggregateFunction.Sum)); 
            sum.Add(new GridViewSummaryItem("Zustatek""{0:C}", GridAggregateFunction.Sum)); 
 
            this.grdHromadnaVyplatnice.MasterGridViewTemplate.SummaryRowsBottom.Add(sum); 

Doug Hamilton
Top achievements
Rank 1
 answered on 03 Nov 2009
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
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?