Telerik Forums
UI for WinForms Forum
4 answers
138 views
How can I tell when a user has modified the Conditional Formatting of a Grid
 using the Conditional Formatting Form
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Dec 2015
3 answers
108 views

Hi, Im still working on my project that uses GanttView. Data are linked to sql server database using a dataset. My problem occurs when I try to add a child or sibling item, because the new item does not appear until the data are saved to db, and I query again.

Of course I'm using the 'ItemChildIdNeeded' event, to assign the correct id

integerIdCounter = My last Id...

Private Sub RadGanttView1_ItemChildIdNeeded(sender As Object, e As Telerik.WinControls.UI.GanttViewItemChildIdNeededEventArgs) Handles RadGanttView1.ItemChildIdNeeded
        Me.integerIdCounter += 1
        e.ChildId = Me.integerIdCounter
 End Sub

What am I doing wrong?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Dec 2015
1 answer
162 views

I am trying to left align the text in the column chooser. When I walk through it debugging, I can see the value successfully get updated but the content is still middle aligned when shown. What is the correct way to left align the text in column chooser?

This is what I am currently doing, the positioning portion works correctly but not the content alignment.

private void ConfigureOrderGrid()
{
        orders_radGridView.ColumnChooser.Shown += (o, args) =>   orders_radGridView.ColumnChooser.SetPosition();
}
 
public static void SetPosition(this GridViewColumnChooser chooser)
{           
    var gridPoint = chooser.GridRootElement.PointToScreen(new Point(0));
    var x = gridPoint.X + chooser.GridRootElement.Size.Width;
    chooser.DesktopLocation = new Point(x, gridPoint.Y);
    chooser.StartPosition = FormStartPosition.Manual;
    chooser.ColumnChooserControl.ColumnChooserElement.TextAlignment =   ContentAlignment.MiddleLeft;
}

 

Stefan
Telerik team
 answered on 17 Dec 2015
1 answer
96 views

Hi

When I collapse/expand the Rad Ribbon Bar, I will see an extra line under every tab.
Is this a bug? How can I solve it?

I have attached an image for more detailed information.

Hristo
Telerik team
 answered on 17 Dec 2015
3 answers
591 views
I need to go through the siblings of a select row when a certain change is made. This selected row is a ChildGridViewTemplate. How do I either get all of the siblings of this row or get the parent of this row so that I can get all of the children of the parent to do the check.

Thank you,
Susan
Dimitar
Telerik team
 answered on 16 Dec 2015
2 answers
974 views

Hello,

 

I have an radgridview that its bound to an datatable from code behind. From code I setup columns and from designer I have one checkbox column.

When I run the app and mark that checkbox column I want to change the text value of one of the other columns. But when I try to change the value of the other column it say "Column "name" its readonly." I check the status of the cell and its says readonly = false;

 private void BindGrid()

{

var result = SqlClass.JT_Batch_GetBatches();

            
            grid_Batch.MasterTemplate.AllowAddNewRow = false;
            this.grid_Batch.AutoGenerateColumns = false;
            this.grid_Batch.AllowEditRow = true;
            this.grid_Batch.MasterTemplate.AllowAddNewRow = false;
            this.grid_Batch.MasterTemplate.AutoGenerateColumns = false;
            this.grid_Batch.MasterTemplate.AllowEditRow = true;
            this.grid_Batch.MasterTemplate.AllowDeleteRow = false;
            this.grid_Batch.MasterTemplate.AllowCellContextMenu = false;
            this.grid_Batch.MasterTemplate.ShowFilterCellOperatorText = false;
            this.grid_Batch.MasterTemplate.ShowHeaderCellButtons = true;
            this.grid_Batch.MasterTemplate.EnableFiltering = false;
            this.grid_Batch.EnableFiltering = true;
            this.grid_Batch.MasterTemplate.ShowFilteringRow = false;
            

            this.grid_Batch.TableElement.BeginUpdate();
            
                        
            try
            {
                using (SqlConnection conn = SqlClass.GetConnection())
                {
                    SqlCommand cmd = new SqlCommand();
                    cmd.CommandText = "GetBatches";
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Connection = conn;

                    SqlDataReader reader = cmd.ExecuteReader();
                    DataTable val = new DataTable();
                    val.Load(reader);                  
                    

                   GridViewTextBoxColumn batch = new GridViewTextBoxColumn("Batch");
                    batch.Width = 161;
                    batch.ReadOnly = true;

                    grid_Batch.MasterTemplate.Columns.Add(batch);

                    GridViewTextBoxColumn comment = new GridViewTextBoxColumn("Comment");
                    comment.Width = 215;
                    comment.ReadOnly = true;

                    grid_Batch.MasterTemplate.Columns.Add(comment);

                    GridViewDateTimeColumn created = new GridViewDateTimeColumn("Created");
                    created.Width = 86;
                    created.ReadOnly = true;

                    grid_Batch.Columns.Add(created);

                    GridViewTextBoxColumn Frequency = new GridViewTextBoxColumn("Frequency");
                    Frequency.Width = 129;
                    Frequency.ReadOnly = true;

                    grid_Batch.MasterTemplate.Columns.Add(Frequency);

                    GridViewTextBoxColumn Status = new GridViewTextBoxColumn("Status");
                    Status.Width = 139;
                    Status.ReadOnly = false;

                    grid_Batch.Columns.Add(Status);

                    GridViewDecimalColumn tran = new GridViewDecimalColumn("# Tran.");
                    tran.Width = 60;
                    tran.ReadOnly = true;

                    grid_Batch.MasterTemplate.Columns.Add(tran);

                    GridViewDecimalColumn Total = new GridViewDecimalColumn("Total");
                    Total.Width = 82;
                    Total.ReadOnly = true;
                    Total.FormatString = "{0:$#,###0.00;($#,###0.00);0}";

                    grid_Batch.MasterTemplate.Columns.Add(Total);

                    GridViewTextBoxColumn SOURCDOC = new GridViewTextBoxColumn("SOURCDOC");
                    SOURCDOC.Width = 0;
                    SOURCDOC.ReadOnly = true;
                    SOURCDOC.IsVisible = false;

                    grid_Batch.MasterTemplate.Columns.Add(SOURCDOC);
                   
                    this.grid_Batch.DataSource = val.DefaultView;

}

private void grid_Batch_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            if (e.Column.Name == "select")
            {
                var row = grid_Batch.CurrentRow.Cells;                                                         
                
                GridViewCellInfo cell = row[5] as GridViewCellInfo;

                if (bool.Parse(row["select"].Value.ToString()) == true)
                    cell.Value = "MArked"; //HERE I GET THE ERROR MESSAGE!!!!!!!!!
                
                else
                    row[5].Value = "Available";       
            }
        }

 

Thanks,

Ed

Dimitar
Telerik team
 answered on 16 Dec 2015
1 answer
56 views

Hello all 

How to make only 1 field that can be filtered like picture attached

 

Hengky
Top achievements
Rank 1
Veteran
 answered on 16 Dec 2015
3 answers
110 views

This was working before, but now when there are null values in a column we cannot use excel like filtering.  I don't think anything changed on our end.  When I click the filter icon in the column header I get this exception:

System.ArgumentNullException was unhandled
  HResult=-2147467261
  Message=Key cannot be null.
Parameter name: key
  ParamName=key
  Source=mscorlib
  StackTrace:
       at System.Collections.Hashtable.ContainsKey(Object key)
       at Telerik.WinControls.UI.RadListFilterDistinctValuesTable.ContainsFilterValue(Object value)
       at Telerik.WinControls.UI.FilterMenuTreeElement.Initialize()
       at Telerik.WinControls.UI.FilterMenuTreeItem.OnLoaded()
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadElement.OnLoad(Boolean recursive)
       at Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
       at Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
       at Telerik.WinControls.RadControl.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

I tried to attached a sample app (in a zip file) which reproduces this problem for us with the latest released version of the grid, but you do not seem to allow zip files to be attached.

John
Top achievements
Rank 1
 answered on 15 Dec 2015
5 answers
258 views

Hi guys,

I have this case: I import a fUTF-8 without BOM file that contains translations of several languages.

My application import using T-SQL command INSERT BULK with DATAFILETYPE = 'widechar' (It needs to import Unicode format)

sql = $"BULK INSERT CaptionFlat FROM '{OpenFileDialog.FileName}' WITH (DATAFILETYPE ='widechar', FIELDTERMINATOR =':',ROWTERMINATOR = '\n')";

 

Afterthat It keeps several operation and INSERT into other table that have a nvarchar field that will contain translation.

This table it will shows by RadGridView with this code

conn = new SqlConnection(Settings.Default.RTK2ConnectionString);
 
sql = "SELECT CBase.[Key] [Key],\n" +
    "CBase.[Value] Base,\n" +
    $"ISNULL((SELECT [Value] FROM [Captions] WHERE [NAVKey] = CBase.[NAVKey] AND [LanguageID] = {LanguageToTranslateComboBox.SelectedValue}),'[Blank]') ToTranslate\n" +
    "FROM [Captions] CBase\n" +
    "WHERE CBase.[IsCaption] = 1\n" +
    $"AND CBase.LanguageID = {LanguageBaseComboBox.SelectedValue}";
 
cmd = new SqlCommand(sql, conn);
da = new SqlDataAdapter(cmd);
dtCaptions = new DataTable("Captions");
 
da.Fill(dtCaptions);
 
CaptionsRadGridView.DataSource = dtCaptions;
 
var obj = new ConditionalFormattingObject("BlankTranslation", ConditionTypes.Equal, "[Blank]", "", true);
obj.CellForeColor = Color.Black;
obj.RowBackColor = Color.LightCoral;
CaptionsRadGridView.Columns["ToTranslateColumn"].ConditionalFormattingObjectList.Add(obj);
 
CaptionsRadGridView.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.DisplayedDataCells);
 
conn.Close();

 

I attach the effects, where the last column shows an error.

The label in language in original file is (for example DE language) "Rack-Jobben (nur für Italien)" but in RadGrid it shows "Rack-Jobben (nur f├╝r Italien)".

 

Can you help me to understand waher I wrong?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Dec 2015
3 answers
150 views

Hi,

I would like know if it's possible to disable the reposition's animation of all tiles after the DragDrop action?

Does it exist an event at the end of the DragDrop animation ? Because after the event DragDropService.Stopped I can see that my tiles are still animated.

 Thanks for your help.

Simon

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Dec 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
AI Coding Assistant
+? 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?