Telerik Forums
UI for WinForms Forum
3 answers
125 views

Hello!

If I create a simple RadForm with a single RadTextBox, this text box is selected (gets input focus and shows cursor) automatically when the form is shown. If I create a simple RadForm with a RadPageView and place the RadTextBox into the page, it is not selected automatically when the form is shown.

Even the following code does not select the text box:

protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
 
    radTextBox1.Focus();
    radTextBox1.Select(0, 0);
}

The following workaround does work, but I do not think this is a way I should go:

protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
 
    Application.Idle += Application_Idle;
}
 
void Application_Idle(object sender, EventArgs e)
{
    Application.Idle -= Application_Idle;
    radTextBox1.Focus();
    radTextBox1.Select(0, 0);
}

So, how should I correctly select the text box in the PageView page when the form is shown?

Thank you.

Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
2 answers
220 views
Hello.

I have a following problem with the combobox:
First I initialize my combobbox:  Value column is a numeric field (Int64) , Display column is a Text field:
ddb_Broker.ValueMember = dtBrokerList.Columns[0].ColumnName;
ddb_Broker.DisplayMember = dtBrokerList.Columns[1].ColumnName;
ddb_Broker.DataSource = dtBrokerList.DefaultView;
ddb_Broker.SelectedItem = null;

When I retrieve data I need to populate the Broker:
ddb_Broker.SelectedValue = Convert.ToInt64(gl_dtProgram.Rows[0]["in_broker"]);
after this line in debugger ddb_Broker.SelectedValue = null ..... ? WHY ?

Please, help me to set this value. The same story happened with other fields ..

Thank you ,
Victoria.
Peter
Telerik team
 answered on 08 Feb 2011
6 answers
368 views
I just started my first WinForms app using Telerik controls today, so maybe I'm overlooking something, but my RadForm's title bar will not display.  Here's what happens:

  1. I compile and run my app (just one form).
  2. It looks fine, but then I click on another app that brings it in front of mine.
  3. Then I click my app's taskbar button to bring it back... no title bar.

Actually, the title bar is there as in it accepts mouse clicks and I can drag the window, but it doesn't draw itself or the controls on it.  It essentially takes a screen shot of what's behind it, then THAT becomes the image of the title bar.  That might be some partial text of a web page that was behind it.

This happens w/ VS2K8 on Windows Vista Ultimate x64 and Windows XP Pro x64.  The latest service packs for everything is installed and I downloaded and installed Telerik Q1 2009 today.
Martin Vasilev
Telerik team
 answered on 08 Feb 2011
3 answers
288 views
I'm having problems when I try to create a new RadGridView.  From the toolbox, I select RadGridView and then draw a box on the form.  When I do this it adds a reference to the control at the buttom, however it's not actually putting the control on the screen.  I checked to make sure that it was visible and the back color was different.  This problem has only started happening to me today, before today I could successfully add a RadGridView to my forms. 
Richard Slade
Top achievements
Rank 2
 answered on 08 Feb 2011
6 answers
143 views
Hi,

Is it possible to export a cell's value member instead of the display member when exporting to excel using ExportToExcelML?

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 07 Feb 2011
3 answers
168 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
328 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
173 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
120 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
120 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
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?