Telerik Forums
UI for WinForms Forum
3 answers
172 views
Hi,

I'm creating a GridViewDecimalColumn as follows:

GridViewDecimalColumn col = new GridViewDecimalColumn();
 
col.Name = node.Name;
col.FielName = node.Name;
col.HeaderText = friendlyName;

When setting the FieldName property, if node.Name = tb_Column then everything is fine. However, when node.Name = tb_Column_1 then I get a FormatException - Input string was not in a correct format.

Do I need to format that FieldName property in any special way or something?

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 07 Feb 2011
3 answers
344 views
Ok,

Yet again, another issue that I am facing with the GridView control... :-)

Here are the steps for creating and populating my grid:

1. I construct my columns (mostly, GridViewTextBoxColumn, GridViewComboBoxColumn, GridViewDecimalColumn and GridViewDateTimeColumn) programmatically on form load. First of all, I construct these columns using xml data for the Fieldname properties etc.

Here is an example:

foreach (XmlNode mapNode in mappingXmlDoc.SelectSingeNode("Mappings"))
{
// Maps to GridViewDateTimeColumn
if (elementPrefix == "dt")
{
GridViewDateTimeColumn col = new GridViewDateTimeColumn();
col.Name = mapNode.Name;
col.FieldName = mapNode.Name;
col.HeaderText = friendlyName;
radGridView1.Columns.Add(col);
}
 
}

2. After I constructed these columns, I go ahead and initialize the grid by assigning it a datasource. The DataSet in turn is populated with xml data:

DataSet dsData = new DataSet();
dsData.ReadXml(xmlFile);
 
radGridView.DataSource = dsData.Tables[0];

The xml data that I read into the DataSet looks like this:

<assets>
<asset>
<tb_Desc></tb_Desc>
<dt_MoveDate><dt_MoveDate>
</asset>
</assets>

3. When setting following properties on the GridViewDateTimeColumn as follows:

foreach (GridViewDataColumn in radGridView1.Columns)
{
string[] strArr = col.FieldName.Split(new char[] {'_'});
 
// This way I know its a GridViewDateTimeColumn
if (strArr[0] == "dt")
{
((GridViewDateTimeColumn)col).ExcelExportType = DisplayFormatType.Custom;
((GridViewDateTimeColumn)col).ExcelExportFormatString = "dd.mm.YYYY";
((GridViewDateTimeColumn)col).FormatString = "{0:dd.mm.YYYY}";
}
}

nothing happens... I've tried to set the properties both before and after I set the gridview's datasource with no success.

Also, I'm using the ExportToExcelML class for exporting and I always end up with data for the date field looking like this: 1/27/2011 12:00:00 AM in both the grid and exported excel spreadsheet which is wrong.

Is there anything I'm doing wrong somewhere?

I appreciate your help.

Thanks
Johan
Top achievements
Rank 1
 answered on 07 Feb 2011
14 answers
176 views
Hi,

Any idea why my RadDateTimeEditor columns always defaults to 1 Jan 1753 on selection?

I've looked at the properties that RadDateTimeEditor expose but can find anything relevant.

Is there a why to default it to DateTime.Now maybe?

Thanks
Johan
Top achievements
Rank 1
 answered on 07 Feb 2011
1 answer
128 views
I am struggling with databinding the RadScheduler.
I have the tables created, the constraints/relationships set up just fine.
When I assign a resource to an existing appointment, the row is added to the AppointmentResource relationship table just fine into the database.

However, when I try to assign a resource to a new appointment, I get a constraint error.
When I remove the constraints, I see values like -4 in the AppointmentId column in the AppointmentResource table.
So, I'm assuming that, since the AppointmentId in the Appointment table is set to IDENTITY, the code that handles the relationships doesn't know the AppointmentId yet when creating the rows to add to the AppointmentResource table.
Is anyone aware of this, and do you have a workaround?  I'm thinking the only workaround is to bind to objects and do the database code myself..
Dobry Zranchev
Telerik team
 answered on 07 Feb 2011
3 answers
128 views
Hi all,
I have a docking manager in my project which all the tabs are populated and they can be closed whenever needed. My issue is that, the CURRENT TABS name should be bold and the names of the remaining tabs should not be so. I am using the dockingmanager_tabchanging to do this, but the problem is that i am not able to undo the changes to the style to the previous tab. So if I have 3 tabs open and I click on one tab, the font changes to bold, now when I click on the next tab the previous TAB'S bold style needs to go away. How can I do this? Can I get a count of the tabs in the docking manager and undo all the styles or something like that I could not do it. Any help would be greatly appreciated. 

Private Sub dockingManager_DockTabChanged(ByVal sender As Object, ByVal e AsTelerik.WinControls.Docking.DockTabChangedEventArgs) HandlesdockingManager.DockTabChanged

   In this event e.Tab.Text just gives the changed tab text.
   Is there any way we can change the text style of all the tabs that are open. Probably some where deep    down the object structure. Again any help would be great.   

    

 End If


Thanks
Ivan Petrov
Telerik team
 answered on 07 Feb 2011
5 answers
146 views
I have a very irritating problem with RadGridView. Look at the video: Filter box suddenly becomes Non-Editable by itself

I am using Q1 2008 SP1. The filter it seems has suddenly become non-editable, at least from the way the textbox vanishes, but if I press on any key like 'd' or 's' or 'q' then this same filter box will show up its filter textbox.

Anyone knows how to get rid of this 'weird' problem?

Thanks
Sunil
Hiram
Top achievements
Rank 1
 answered on 07 Feb 2011
17 answers
366 views
Hello, all

I have a RadForm with RadTreeView on it. When user change selected node on tree view I update form header (set node text into header). The header text is blinking when I do it.

Here is the code

private void radTreeView1_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
        {
            RadTreeNode node = this.radTreeView1.SelectedNode;

            if (node == null)
            {
                return;
            }

            Text = "Repository Explorer - " + node.Text;

            //Do something operations
            System.Threading.Thread.Sleep(1000);
        }

Can you help me?

Andrew Shyliuk
Stefan
Telerik team
 answered on 07 Feb 2011
1 answer
153 views
Hi,
I am implementing customized items in context menu where one of the menu items have sub items (children) elments but the problem is that when i take the mouse on sub items(childrens) the sub items still remain non-highlited.....and also the click event gets called on double click not on single click.

Also tell me Is there any possibility of implementing sub menu item like there is available in word (attached file).

I need examples in windows forms not on web.

Please help me how to highlight those items on "mouse over".

Stefan
Telerik team
 answered on 07 Feb 2011
1 answer
129 views
Hi,
I am implementing customized items in context menu where one of the menu items have sub items (children) elments but the problem is that when i take the mouse on sub items(childrens) the sub items still remain non-highlited.....and also the click event gets called on double click not on single click.

Also tell me Is there any possibility of implementing sub menu item like there is available in word (attached file).

I need examples in windows forms not on web.

Please help me how to highlight those items on "mouse over".

Dobry Zranchev
Telerik team
 answered on 07 Feb 2011
4 answers
144 views
Hi,

I am new to radControls so this will most likely be something simple.

I have a textbox which I would like to change the backcolour but when I change the backcolour in the properties, nothing changes.

What am I missing?

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 07 Feb 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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?