Telerik Forums
UI for WinForms Forum
1 answer
259 views
Hello
I want to enter Tabs and Linebreaks in a textbox column. I tryed this, but it does not work.
private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)  
{  
    RadTextBoxEditor editor = radGridView1.ActiveEditor as RadTextBoxEditor;  
    editor.AcceptsReturn = true;  
    editor.AcceptsTab = true;  
} 
When I press the tab key, the cursor goes to the next column.

Greetings,
wima
Jack
Telerik team
 answered on 29 Dec 2009
5 answers
134 views
Hi

Please look on this image(http://65.57.255.33/TreeViewWithUserControl.JPG). I need to show windows user control on node selection.
I am using "RadControls for WinForms Q2 2009 SP1".
Please help me to do this. Thanx.

Atul Srivastav
Nick
Telerik team
 answered on 29 Dec 2009
4 answers
171 views
How would I change the font weight and color of the values in a particular cell based on a caculcation between 2 other cells.  For instance, when Accounts Receivable is less than Accounts Payable (both are grid columns) how would I format the Total revenue column so that the values in them are Red and bold and when the opposite is true, then how would I format it to bold and black?
Jeremy Pryor
Top achievements
Rank 1
 answered on 28 Dec 2009
2 answers
198 views
I have been looking at creating an control similar to the one found in the demos for the grid view.  What I need is help determining how to store an image in my SQL Server database, retrieve it as a part of an employee record, display it as in the demo, but have the ability to click on a button (possibly a column header) and then change the image.  We have formal and informal shots of every employee and want to be able to toggle between the 2.  Please help.  I can't make a lot of since from the online demo, because I can't seem to find the Photo datasource the code is referencing and where that comes from.

Thanks,

JP
Jeremy Pryor
Top achievements
Rank 1
 answered on 28 Dec 2009
6 answers
329 views
Hi,

I Have a RadGridView (ver 2009.Q3.SP1) and i am formating the rows backcolor using the following code:

 
    Private Sub RGVContacts_RowFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles RGVContacts.RowFormatting  
        If e.RowElement.IsOdd Then  
            e.RowElement.BackColor = Color.Moccasin  
        Else  
            e.RowElement.BackColor = Color.FloralWhite  
        End If  
 
        e.RowElement.DrawFill = True 
    End Sub 

After we have the mouse over a row,  the row is chnaging color and after leaving the row does not return to its original color.
Also, we have the similar problem when selecting one row and then another. The previous selected row does not return to its original color.

Any help will be appreciated.
gdelatolas
Top achievements
Rank 1
 answered on 28 Dec 2009
1 answer
223 views
Hi

I have a usercontrol in master page,in this usercontrol ,i have placed tab strip,onclick of tab strip ,i am redirecting to another page.

Page is redirecting to another page but ,that tab is not getting selected,please haelp me out,
i am attaching the source code of that user control :

 

Source code (ascx)  
====================  
 <table class="planTabTable" width="100%" >  
        <tr>  
            <td colspan="5">  
            <rad:RadTabStrip ID="PlanTabs" runat="server" Skin="Office2007" AutoPostBack="True" SelectedIndex="0" ClickSelectedTab="True">  
                <Tabs>  
                    <rad:Tab ID="Tab1" runat="server"  Text="Summary"   >  
                    </rad:Tab>  
                    <rad:Tab ID="Tab2" runat="server"  Text="Room Revenue"   >  
                    </rad:Tab>  
                    <rad:Tab ID="Tab3" runat="server"  Text="Line Items" >  
                    </rad:Tab>  
                    <rad:Tab ID="Tab4" runat="server"  Text="Audit">  
                    </rad:Tab>  
                </Tabs>  
            </rad:RadTabStrip>  
        </td>  
    </tr>  
</table>  
 
Code behind (ascx.vb)  
=====================  
Imports PortfolioOne.Common  
 
<Serializable()> _  
Partial Public Class PlanTabControlHeader_NEW  
    Inherits P1BaseUserControl
#Region "Properties"  
 
    ' these get rendered on the page to set the css class for each tab  
    ' they get set in PreRender  
    Protected _roomRevenueTabClass As String = "planTabUnactive" 
    Protected _lineItemsTabClass As String = "planTabUnactive" 
    Protected _summaryTabClass As String = "planTabUnactive" 
    Protected _auditTabClass As String = "planTabUnactive" 
    Private _tabQueryString As String = "" 
    Private _activeTab As PlanTabSelection = PlanTabSelection.RoomRevenue  
 
    Public Property TabQueryString() As String 
        ''' <summary>  
        ''' The params that the tab control should put in the links of the tabs.  
        ''' Do not include the leading '?'.  
        ''' </summary>  
        Get 
            Return _tabQueryString  
        End Get 
        Set(ByVal value As String)  
            _tabQueryString = value  
        End Set 
    End Property 
 
    Public Property ActiveTab() As PlanTabSelection  
        ''' <summary>  
        ''' Sets the active tab shown on the control.  
        ''' </summary>  
        Get 
            Return _activeTab  
        End Get 
        Set(ByVal value As PlanTabSelection)  
            _activeTab = value  
        End Set 
    End Property
#End Region  
 
#Region "Events" 
 
    ' we'll fire this event when a tab is clicked so the pages can listen for it  
    Public Event TabClicked As CommandEventHandler  
 
    Protected Overrides Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init  
        MyBase.Page_Init(sender, e)  
    End Sub 
 
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not Me.IsPostBack Then 
            If Me.Parent.FindControl("hdnEditVersionGUID") Is Nothing Then 
                Me.GUIDPlanVersionID.Value = Request.QueryString("GUID").ToString()  
            Else 
                Me.GUIDPlanVersionID.Value = DirectCast(Me.Parent.FindControl("hdnEditVersionGUID"), HtmlInputHidden).Value  
            End If 
 
 
 
            'If Me.Parent.FindControl("hdnCompareVersionGUID") Is Nothing Then  
            '    Me.GUIDComparePlanVersionID.Value = Request.QueryString("CompareGUID").ToString()  
            'Else  
            '    Me.GUIDComparePlanVersionID.Value = DirectCast(Me.Parent.FindControl("hdnCompareVersionGUID"), HtmlInputHidden).Value  
            'End If  
 
 
        End If 
    End Sub ' Page_Load  
 
    Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender  
 
        Try 
            Dim intTabIndex As Integer 
            If Session("LastClick") IsNot Nothing Then 
                intTabIndex = CInt(Session("LastClick").ToString())  
            Else 
                intTabIndex = 0  
            End If 
 
            Dim oTab As Telerik.WebControls.Tab = PlanTabs.Tabs(intTabIndex)  
            If Not oTab Is Nothing Then 
                oTab.BackColor = Drawing.Color.Honeydew  
                oTab.ForeColor = Drawing.Color.Blue  
                oTab.SelectParents()  
            End If 
 
        Catch ex As Exception  
            Call Alloso.PortfolioOne.Common.WriteToEventLog(System.Reflection.MethodBase.GetCurrentMethod.Name, Err.Number, ex.ToString(), EventLogEntryType.Error, Me.MyUser.UserName)  
 
        End Try 
 
    End Sub ' Page_PreRender  
 
    Protected Sub PlanTabs_TabClick(ByVal sender As System.Object, ByVal e As Telerik.WebControls.TabStripEventArgs) Handles PlanTabs.TabClick  
 
        Try 
 
            Select Case e.Tab.Text  
                Case "Summary" 
                    Session("LastClick") = 0  
                    RaiseEvent TabClicked(Me, New CommandEventArgs("PlanTabClicked", PlanTabSelection.Summary))  
                    Response.Redirect("PlanSummary_NEW.aspx?" & _tabQueryString & "GUID=" & Me.GUIDPlanVersionID.Value, True)  
 
                Case "Room Revenue" 
                    Session("LastClick") = 1  
                    RaiseEvent TabClicked(Me, New CommandEventArgs("PlanTabClicked", PlanTabSelection.RoomRevenue))  
                    Response.Redirect("PlanRevenue_NEW.aspx?" & _tabQueryString & "GUID=" & Me.GUIDPlanVersionID.Value, True)  
 
                Case "Line Items" 
                    Session("LastClick") = 2  
                    RaiseEvent TabClicked(Me, New CommandEventArgs("PlanTabClicked", PlanTabSelection.LineItems))  
                    Response.Redirect("PlanExpenses_NEW.aspx?" & _tabQueryString & "GUID=" & Me.GUIDPlanVersionID.Value, True)  
                Case Else 
                    Session("LastClick") = 3  
                    ' else assume audit  
                    RaiseEvent TabClicked(Me, New CommandEventArgs("PlanTabClicked", PlanTabSelection.Audit))  
                    Response.Redirect("PlanAudit_NEW.aspx?" & _tabQueryString & "GUID=" & Me.GUIDPlanVersionID.Value, True)  
            End Select 
 
            PlanTabs.SelectedTab.BackColor = Drawing.Color.Blue  
 
        Catch ex As Exception  
            If Err.Number <> 5 Then Call Alloso.PortfolioOne.Common.WriteToEventLog(System.Reflection.MethodBase.GetCurrentMethod.Name, Err.Number, ex.ToString(), EventLogEntryType.Error, Me.MyUser.UserName)  
 
        End Try 
 
    End Sub 
 
    Private Sub PlanTabs_TabSelected(ByVal sender As Object, ByVal args As Telerik.WebControls.TabStripEventArgs)  
 
    End Sub
#End Region  
 
End Class 

Veselin Vasilev
Telerik team
 answered on 28 Dec 2009
1 answer
90 views
I have an issue with my grid.  It seems when I set properties using the property builder the values do not appear when the program is run even though the changes appear in the preview pane.  That said, I can set the same properties in code, run the program and they work.
Can anyone explain why?

Thanks,
Tom

Here's a snippet of code I used.  The grid is bound to a stored procedure, which I refresh after passing in a new DeptID.  The grid sits inside a panel, which is set to visible after the grid is updated.
 clsDept.DeptID = DeptID
            rc = clsDept.GetTruckStatusByStation()
            Me.grdVehicle.DataSource = clsDept.TT
            Me.grdVehicle.MasterGridViewTemplate.AllowAddNewRow = False
            Me.grdVehicle.ReadOnly = True
            Me.grdVehicle.Columns(0).IsVisible = False
            Me.grdVehicle.Columns(1).HeaderText = "Vehicle"
            Me.grdVehicle.Columns(3).IsVisible = False
            Me.grdVehicle.Columns(4).FormatString = "{0:MM/dd/yyyy}"
            Me.pnlMain.Visible = True
Victor
Telerik team
 answered on 28 Dec 2009
2 answers
109 views
Hi,

On my desktop computer[Os = XP], When i open up a project and set the dll references, I can see "Desert Theme" for any Rad control when i click on Theme Name property in Visual Studio Designer.

But on my laptop[Os = Vista], I give reference to all telerik dll's, i drag and drop Desert Theme to my designer page, but i only can see "Control Default" and "Office2007Blue".

I couldnt figure out the problem, so i really appreciate if you can help me,

Thanks in advance.
.
Top achievements
Rank 1
 answered on 26 Dec 2009
1 answer
166 views
I have a couple of MultiColumnComboBoxes on my form and find that when I load my form with data and set the combo value as required, if the value I set it with differs from the current selected value of the combo, then the combo opens up.  This is not desired behaviour.  I am setting the combo value using the .Text property, as I would with a standard combo.  I have tried using other properties to set the value, but these do not actually set the value at all.  Can you advise which property I should use to set the value?


Thanks
Boyko Markov
Telerik team
 answered on 25 Dec 2009
1 answer
1.4K+ views
Hi,

How can i make radGridview column header text bold programmatically?

Jack
Telerik team
 answered on 24 Dec 2009
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?