Telerik Forums
UI for WinForms Forum
0 answers
107 views
Can anyone tell me what's wrong with the following code.  When it gets to the line of code
grdStations.DataSource = taStations.GetData(1) I get a run time error for a "login failure for User5" .  The tableadapter is a call to a stored procedure, and User5 has permissions to execute the procedure.  Any help would be appreciated.

Thanks
Tom

 Private Sub LoadStationGrid()
         Dim taStations As New stationsTableAdapters.GetStationsByDeptTableAdapter
        Dim dsTrucks As New stationsTableAdapters.TruckTableAdapter   

        grdStations.DataSource = taStations.GetData(1)

        Dim template As GridViewTemplate = New GridViewTemplate
        template.DataSource = dsTrucks.GetData()
        grdStations.MasterGridViewTemplate.ChildGridViewTemplates.Add(template)

        Dim relation As GridViewRelation = New GridViewRelation(grdStations.MasterGridViewTemplate)
        relation.ChildTemplate = template
        relation.RelationName = "StationTrucks"
        relation.ParentColumnNames.Add("sID")
        relation.ChildColumnNames.Add("StationID")
        grdStations.Relations.Add(relation)
        

    End Sub
tcl4p
Top achievements
Rank 1
 asked on 17 May 2010
8 answers
403 views
Another MaskedEditBox question...is the following behavior by design, and if so is there a hack I can employ to stop it:

I have a MaskedEditBox set up with the mask of "(###) ###-####".  I enter "(800) 555-1212" in the control.  I select all of the text and attempt to type over it to enter a new number.  Nothing happens.  I have to select the text, delete it, then type again or overwrite one character at a time.

I would like to be able to select the text and begin typing to overwrite it, as with a normal textbox.

Josh
Marina Vision
Top achievements
Rank 1
 answered on 16 May 2010
1 answer
117 views
Hello
i got this situation:
i have a textbox and a combo, i filled the combo in the form_load event
 the combo properties:
   DisplayMember = "Test1"
   ValueMember = "Test2"

i want when i choose a item in the combo the textbox get the SelectedValue but
the problem with SelectedIndexChanged or SelectedValueChanged event, is this events fires even when i filled the combo
there are any event like ItemClick or else that only fires when you click on an item not every time you filled the combo?

if you have a query under this events, the query will be executed even if you don't want to
and this will affect the performance of your application because if you need to update the combo values often
the event will fire again and again

any help
thanks

P.S.
Sorry about my english, is not good enough
 
Victor
Telerik team
 answered on 15 May 2010
1 answer
218 views
Hi Telerik team,

I have a scenario where in my gridview i need to show up combox for some cells and hide them for some other cells based on a
condition.

I tried this using Cell_formatting event using the following code but it doesnt seem to work fine.

 

private void radGridView2_CellFormatting(object sender, CellFormattingEventArgs e)

 

{

 

 

if (e.CellElement.ColumnInfo.HeaderText == "Amount" && customers.ToList<Customer>()[e.CellElement.RowIndex].Amount < 10 )

 

{

check =

true;

 

}

if

 

(this.radGridView2.Columns[e.CellElement.ColumnIndex].UniqueName == "Type1")

 

{

 

if (check)

 

{

((Telerik.WinControls.UI.

GridComboBoxCellElement)(e.CellElement)).Visibility = ElementVisibility.Hidden;

 

check =

false;

 

}

}


Here check is a class level boolean variable and I have a customer collection with 3 properties.  And the Type1 and Amount columns are dynamically added at runtime.

 

GridViewComboBoxColumn combo = new GridViewComboBoxColumn();

 

combo.HeaderText =

"Type1";

 

combo.UniqueName =

"Type1";

 

combo.DataSource =

this.BindData();

 

combo.DisplayMember =

"KeyValue";

 

combo.ValueMember =

"StringValue";

 

 

this.radGridView2.Columns.Add(combo);

 

 

 

GridViewTextBoxColumn data = new GridViewTextBoxColumn();

 

data.HeaderText =

"Amount";

 

data.UniqueName =

"Amount";

 

data.FieldName =

"Amount";

 

 

this.radGridView2.Columns.Add(data);

 



Kinldy help me  out in doing this.

Thanks
KrisYs
Svett
Telerik team
 answered on 15 May 2010
1 answer
120 views
Hi,
i use the RadListBox that comes with WinForms Q3 2009 SP1 in my C# project. One major difficulty i face now is i want to  perform a condition on adding items to the radListBox. i.e, all items must be added only once.no duplication of same item must be present. In the standard listbox of Windows Forms i used if(!listbox1.item.contains(s)) to enter a string s, but i need to know how to implement this using RadListBox.
Dobry Zranchev
Telerik team
 answered on 14 May 2010
1 answer
99 views
Hello,

How do I disable tabbed child views that belongs to the same parent but have different columns. I want to be able to expand many childs to see data from them at same time - not tab between them.

Example: Parent has two childs that are from different dataset and have different columns and data in them. Is there a way of not getting them tabbed when setting up their relations to the parent.

Regards
Jack
Telerik team
 answered on 14 May 2010
1 answer
332 views
Hello

I need to enable the update button in a form whenever the value of any control in the form change its value. It works fine for RadTextBox, RadComboBox, but it doesn't work either for RadSpinEditor nor RadDateTimePicker.

 Private Sub Text_Changed(ByVal sender As System.ObjectByVal e As System.EventArgs) _ 
            Handles RadTextBox1.TextChanged, _ 
                    RadComboBox1.TextChanged, _ 
                    RadDateTimePicker1.TextChanged, _ 
                    RadSpinEditor1.TextChanged 
 
        If RadTextBox1.ContainsFocus Or _ 
           RadComboBox1.ContainsFocus Or _ 
           RadDateTimePicker1.ContainsFocus Or _ 
           RadSpinEditor1.ContainsFocus Then 
             Me.UpdateButton.Enabled = True 
        End If 
 
        
    End Sub 

I tried a more generic way to do it with this procedure, that didn't work too:

 
Private Sub Text_Changed(ByVal sender As System.ObjectByVal e As System.EventArgs) _ 
            Handles RadTextBox1.TextChanged, _ 
                    RadComboBox1.TextChanged, _ 
                    RadDateTimePicker1.TextChanged, _ 
                    RadSpinEditor1.TextChanged 
 
       
        If HasFocus(sender) Then 
            Me.RadButton1.Enabled = True 
        End If 
 
End Sub 
 
 
Public Function HasFocus(ByVal sender As System.ObjectAs Boolean 
        Dim radElemento As Telerik.WinControls.RadElement 
 
        If sender.GetType Is GetType(Telerik.WinControls.UI.RadTextBox) Then 
            radElemento = DirectCast(sender, Telerik.WinControls.UI.RadTextBox).FocusedElement 
        End If 
        If sender.GetType Is GetType(Telerik.WinControls.UI.RadComboBox) Then 
            radElemento = DirectCast(sender, Telerik.WinControls.UI.RadComboBox).FocusedElement 
        End If 
        If sender.GetType Is GetType(Telerik.WinControls.UI.RadSpinEditor) Then 
            radElemento = DirectCast(sender, Telerik.WinControls.UI.RadSpinEditor).FocusedElement 
        End If 
        If sender.GetType Is GetType(Telerik.WinControls.UI.RadDateTimePicker) Then 
            radElemento = DirectCast(sender, Telerik.WinControls.UI.RadDateTimePicker).FocusedElement 
        End If 
        If sender.GetType Is GetType(Telerik.WinControls.UI.RadCheckBox) Then 
            radElemento = DirectCast(sender, Telerik.WinControls.UI.RadCheckBox).FocusedElement 
        End If 
 
        If Not radElemento Is Nothing AndAlso radElemento.ContainsFocus Then 
            Return True 
        Else 
            Return False 
        End If 
End Function 

Thank you



Dobry Zranchev
Telerik team
 answered on 14 May 2010
1 answer
281 views
Hi, I cannot get rid of the horizontal scrollbar on a listbox.

I do ....

  listbox.HorizontalScroll.Enabled = False 
  listbox.HorizontalScroll.Visible = False 

but it has not effect.

I am using 2010 Q1 SP2 in VS 2010.

Any help is greatly appreciated.
Thanks,
Diego
Victor
Telerik team
 answered on 14 May 2010
1 answer
145 views
Hi there, 
I am using Radcontrols for Winforms Q3 2008 SP2. I am facing some difficulties using radTreeView, i want expand and collapse operation on a single click. I tried to use tree_selected and tree_MouseDown events to get this behaviour but i was not able to get it done.

Please suggest some solution.
Regards
Aman
Victor
Telerik team
 answered on 14 May 2010
5 answers
217 views
I am using the CollapsiblePane example to learn more about this control.  I am having problems setting the text property of the control.  If I use the Theme Manager, I can set the property but, I cannot set it in the properties or in code.  The component always seems to default to "CollapsiblePane".  Is there something I am overlooking in setting the text property for the object?

Thanks
Nikolay
Telerik team
 answered on 13 May 2010
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
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?