Telerik Forums
UI for WinForms Forum
3 answers
313 views

When I search for an item in a row, the grid does not scroll down to the selected row.

The row is selected, but I have to manually scroll down to the selected row.

I have AutoScroll = true

Thanks

If filterTextBox.Text <> "" Then
    For Each row As GridViewDataRowInfo In LotDetailsDataGrid.Rows
        If (filterTextBox.Text.Equals(row.Cells("ISBN_13").Value.ToString)) Then
            row.IsSelected = True
            Exit For
        End If
    Next
End If
Stefan
Telerik team
 answered on 22 May 2012
4 answers
380 views
Hello all,
I want to make ComboBox Readonly, i don't find a good Solution in the forum.
I don't to use Skin...
So
I implemented a simple code !!! that i maked with help on demo:
            if (ZoneText is RadComboBox)  
            {  
                ((RadComboBox)ZoneText).EnableViewState = false;  
                if (mode == ModeEdit.ADD)  
                {  
                    ((RadComboBox)ZoneText).BackColor = Color.White;  
                    ((RadComboBox)ZoneText).ShowToggleImage = true;  
                    //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = true;  
                    //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = true;  
                    ((RadComboBox)ZoneText).OnClientKeyPressing = "";  
                    ((RadComboBox)ZoneText).OnClientDropDownOpening = "";  
                    ((RadComboBox)ZoneText).EnableTextSelection = true;  
 
                }  
                if (mode == ModeEdit.BROWSE)  
                {  
                    ((RadComboBox)ZoneText).BackColor = Color.FromName("#E6E6E6");  
                    ((RadComboBox)ZoneText).ShowToggleImage = false;  
                    //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = false;  
                    //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = false;  
                    ((RadComboBox)ZoneText).OnClientKeyPressing = "CancelKeyPress";  
                    ((RadComboBox)ZoneText).OnClientDropDownOpening = "CancelDropDown";  
                    ((RadComboBox)ZoneText).EnableTextSelection = false;  
 
                }  
                if (mode == ModeEdit.EDIT)  
                {  
                    ((RadComboBox)ZoneText).BackColor = Color.White;  
                    ((RadComboBox)ZoneText).ShowToggleImage = true;  
                    //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = true;  
                    //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = true;  
                    ((RadComboBox)ZoneText).OnClientKeyPressing = "";  
                    ((RadComboBox)ZoneText).OnClientDropDownOpening = "";  
                    ((RadComboBox)ZoneText).EnableTextSelection = true;  
 
                }  
            } 
    public enum ModeEdit  
    {  
        ADD,  
        EDIT,  
        BROWSE  
    } 
and finnaly
i make 2 simple function JS !!!

<script type="text/javascript">  
 
    function CancelDropDown(sender, eventArgs) {          
         eventArgs.set_cancel(true);  
    }    
 
    function CancelKeyPress(sender, eventArgs)  
    {  

        eventArgs.get_domEvent().keyCode =

null;

    }  
</script> 

Code not complexe, but make combo like textBox,
enjoy!!!!
Adrian
Top achievements
Rank 2
 answered on 22 May 2012
9 answers
410 views
Hello,
I'm wondering if is there any control that display a balloon over another control to display information. Something similar to the notices of windows SO system tray but in our aplication and over a button for example, and of course more powerfull than a simple tooltip. Where I can insert controls like buttons, textbox, etc...
Thanks!
Karl
Top achievements
Rank 1
 answered on 22 May 2012
1 answer
401 views
Hi
When I add button element to my ribbon group there are borders around it. How can I remove borders?
Stefan
Telerik team
 answered on 22 May 2012
4 answers
340 views
Hello,

I am currently researching possibilities for using multiple control types in a single GridViewDataColumn.  Namely, we need to be able to use RadComboBox and RadTextBox interchangeably in a single column.

I would just like to know if Telerik has encountered this question before, and if there are any reasons why this wouldn't be possible.  If so, how might you suggest a "best practice" for going about this.  I certainly have found very little -- if any -- scenarios of others needing this functionality.

I appreciate any advice that can be offered.

Best Regards,

Daryl
Daryl
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
207 views
I use Telerik Version=2011.3.11.1219 and try use TreeView control with TriStateMode.

Question 1: Also I want to prevent checking node due some conditions - for example, if node.ImageKey ="class_grey" (some picture from imagelist container).

Private Sub RadTreeView1_NodeCheckedChanging(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RadTreeViewCancelEventArgs) Handles RadTreeView1.NodeCheckedChanging
  If Not e.Node.Checked AndAlso e.Node.ImageKey = "class_grey" Then
    e.Cancel = True
  End If
End Sub

If I make that tree:
 
and try to check node "Node1" - I get this situation:


But it is obviously wrong! Nodes "Node1" and "Node8" have wrong state mode ("On" instead of "Indeterminate")
It should be like that (which I got if uncheck/check node "Node9"):


How can I fix that?

Question 2: How can I change view of checkbox in TriState mode? For example, I would like to change view for "Indeterminate" mode from filled green box to red tick.
Svett
Telerik team
 answered on 21 May 2012
1 answer
106 views
Hi there -

I'm new to Entity Framework and still working my way through the gridview control.  I'm not sure where to put this question, so I figured I would start here.

I have an entity framework (EF) with a header-detail model.  When I perform the linq query with an include, I want to display the sub entities (the details) in the grid.  Would be even nicer if I group group by the details (all in one grid).

So my questions may be, how do I write/use the linq query to bring back the headers and group the details within the same grid.  Here is what I have so far:
Private Sub loadLotDetails(PO_Number As String)
    Dim query = From l In context.Lot_Header.Include("Lot_Detail")
                Where l.Lot_Number = PO_Number And l.Lot_Process_Status <> "90"
                Select l
 
    lotDetailsGridView.DataSource = query
End Sub

I appreciate any information or direction possible.

Thanks
Bob



Julian Benkov
Telerik team
 answered on 21 May 2012
4 answers
502 views
OK - So I'm still new to all this EF and Telerik stuff.  However after doing research I'm sure it's not a Telerik control issue.  In any case, I thought I would start here for help.
I have a simple Entity relationship (Lot_head and Lot_Detail)

When I execut the following code:
Private Sub btnSearchPO_Click(sender As System.Object, e As System.EventArgs) Handles btnSearchPO.Click
 
    LotDetailsDataGrid.DataSource = getLotDetails(PurchaseOrderTextBox.Text)
 
End Sub
 
Private Function getLotDetails(lotNumber As Integer) As List(Of Lot_Detail)
    Using context As New Three_Way_MatchEntities
        Dim lot = (From ld In context.Lot_Detail
        Where (ld.Lot_Number = lotNumber)
                  Select ld).ToList
 
        Return lot
    End Using
End Function

The grid populates the data correctly, however when I scroll to the end of a row, it throws the "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection." exception.

Now I understand that since I am using lazing loading and using the 'Using' statement, the context has been disposed.  I'm also assuming that the datagrid must rely on having that context left open.  As many have mentioned you should keep the context open for only as long as you need it.  If that's the case, how would you write this example?

Thanks for the help!
Bob
Julian Benkov
Telerik team
 answered on 21 May 2012
2 answers
207 views

Hi there,

I am writing to you to understand if you could help me as to the following.

 

Currently I am developing an application and I am exploiting RAD WinControls in C#.

In one form I have a few text boxes with the TextBoxElement.Shape set to RoundRect.

 

I would need to do the same in a couple of dropdown lists and in one datetime picker.

Therefore I am trying to set the related properties in the same way:

e.g. ddlDropDown.DropDownListElement.Shape = new Telerik.WinControls.RoundRectShape();

 

Yet in this case the displayed items show some white angles (see attachment)

 

Would you please help me to understand how to fix that, i.e. how to delete or hide the white angles?

 

Thanks in advance for your kind collaboration

Best regards

 

Davide

Davide
Top achievements
Rank 1
 answered on 18 May 2012
1 answer
140 views
Is there any way to get the RadLabel size when it is created via runtime?

I am trying to calculate the height of a container control by summing the height properties of the controls added to the container.

When create a new object instance of a RadLabel in code such as this:

Dim p_Label as New RadLabel

 . .  the width and height properties are set to 0 and remain at zero even after setting the text property.

I was looking for some type of Resize method that could be called after setting the .Text and .Font property, but have been unable to find such a way to cause the control to recalculate its size.

A point of clarification: after adding the RadLabel to a container the height property is always 1, which is not really the case.
Stefan
Telerik team
 answered on 17 May 2012
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?