Telerik Forums
UI for WinForms Forum
3 answers
393 views

I've recently taken over development of a WinForms application using VB.NET.

A form has a RADGridView control (rgvEntities) consisting of the following Columns collection members:
- EntityName: GridViewMultiComboBoxColumn
- City: GridViewTextBoxColumn
- State: GridViewTextboxColumn
- Flag: GridViewCheckBoxColumn
- EntityID: GridViewTextBoxColumn

When the user clicks on the grid view row labelled "Click here to add a new row", the EntityName column displays a combobox for the user to choose the EntityName. When the user clicks on the drop-down arrow of the combobox, the combobox displays the following columns entityid, entityname, city, state.

My issue is that I'd like for the entityid column to not be displayed.

The RADGridView control (rgvEntities) is populated with the following code, that receives the reader as an argument:

  Dim dr As DataRow
  Dim strValues(5) As String

  While reader.Read
    strValues(0) = reader("EntityID")
    strValues(1) = reader("City")
    strValues(2) = reader("State")
    If reader("Flag") = "Y" Then
 strValues(3) = True
    Else
 strValues(3) = False
    End If
    strValues(4) = reader("EntityId")

    rgvEntities.Rows.Add(strValues)
  End While

I think (remember, I didn't code this initially) the entityName column is populated with the following VB.NET code in the Handles rgvEntities.UserAddedRow event handler:

  Dim colEntity As Telerik.WinControls.UI.GridViewComboBoxColumn

  Dim dbconn As New SqlConnection(App.My.Settings.dbConn)
  Dim cmd As New SqlCommand
  Dim daEntity As SqlDataAdapter
  cmd.CommandType = CommandType.Text
  cmd.Connection = dbconn

  Dim sSql As String = ""
  sSql = "select entityid, entityname, city, state from Entities "
  sSql = sSql & " where Entityid > 0 order by 1"
  cmd.CommandText = sSql
  daEntity = New SqlDataAdapter(cmd)
  ds = New DataSet()
  daEntity.Fill(ds)

  colEntity = rgvEntities.Columns("Entity")
  colEntity.DataSource = ds.Tables(0)
  colEntity.DisplayMember = "entityname"
  colEntity.ValueMember = "entityid"

  dbconn.Close()
  colEntity = Nothing
  daEntity = Nothing
  dbconn = Nothing

Where rgvEntities is the RADGridView defined as:
  Friend WithEvents rgvEntities As Telerik.WinControls.UI.RadGridView

Thanks in advance for any help.

Stefan
Telerik team
 answered on 04 Aug 2011
1 answer
92 views
Hi
I'm using the Telerik RichTextBox (beta) but when I type in or copy text and attempt to highlight it with the mouse, everything but the first character (either of a line or the first character of the paragraph) is highlighted. Is this a known issue or am I doing something wrong? I'm using .NET 4 etc. and other parts of the control seem to work fine. It's obviously going to be a problem if the user cannot select the first character except by using the keyboard (shift + arrow keys).

Thanks
Matthew
Stefan
Telerik team
 answered on 04 Aug 2011
1 answer
208 views
Hi
Is it possible to change the default font and font size? It always uses Calibri at size 12.  I've changed the Font property on the ribbon and also on the RadRichTextBox as well but it still defaults to Calibri.
Thanks
Matthew
Stefan
Telerik team
 answered on 04 Aug 2011
0 answers
107 views
Hi, wanted to know how to change the color of the text that appears disable in radstatusstrip.
Best Regards,

Daniel Soares
Daniel
Top achievements
Rank 1
 asked on 04 Aug 2011
1 answer
235 views
Is it possible to do custom filtering in the listview like it is possible in radgridview?

I want to do a contains filter on an integer column.  But this is not possible. In radgridview this was possible by setting the MasterTemplate.FilterPredicate.
Julian Benkov
Telerik team
 answered on 04 Aug 2011
1 answer
91 views
Hi,

In the design time, when I open the "Rows" properties of the RadCommandBar, the exception error will be thrown.  I have no idea what's wrong.  Please advise. Thanks!


Best Regards,
Emily
Stefan
Telerik team
 answered on 04 Aug 2011
2 answers
307 views
Hello,
I'm
formatting some columns RadGridView to give effect link in a cell.
I'm doing this using the event "CellFormatting." The effect works well until you use the scroll bar to navigate between records. We realize that some cells that are not in the context of link is getting the effect. It seems to me that there is a problem to apply the effect on the grid at the time the scrolling and done quickly.

Tks.

 Below is the code inserted to modify the cell.
public void CtrlDataGridList_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            switch (e.Column.Name)
            {
                case "CommandColumnSearchMother":
                case "CommandColumnSearchFather":
                    if (!string.IsNullOrWhiteSpace(e.CellElement.Text.Trim()))
                    {
                        e.CellElement.CustumizeLinkCell();
                    }
                    break;
                case "CommandColumnOpen":
                    if (string.IsNullOrEmpty(_openMessage))
                    {
                        _openMessage = I18n.Term.I18nTerm.GetMessage("OPEN");
                    }
                    e.CellElement.Text = _openMessage;
                    e.CellElement.CustumizeLinkCell();
                    break;
            }
        }
 
public static void CustumizeLinkCell(this GridCellElement cellElement)
        {
            cellElement.Font = new Font(SystemFonts.DialogFont, FontStyle.Underline);
            cellElement.ForeColor = Color.Blue;
        }

 

Jacques
Top achievements
Rank 1
 answered on 04 Aug 2011
1 answer
147 views
hi,

i building theme using visual theme builder,
i don't know how to set theme for horizontal scroll bar  of grid
plz help me
Ivan Petrov
Telerik team
 answered on 04 Aug 2011
8 answers
226 views
Is there a way to replicate the behaviour of the Outlook calendar, where you click on an individual day and the entire week is highlighted?

I have linked the Calendar to a Scheduler control, and it displays the correct week there, but I would like to highlight the entire week in the Calendar control, rather than the single day

Thanks
Boryana
Telerik team
 answered on 04 Aug 2011
1 answer
218 views
Hi,

Can anyone please advise as to how I can set the border and fill color for inactive tabs? My selected tab shows up nicely, but I have a bunch of inactive/un-selected tabs, and because there's a fair amount of text on each, it shows up a a shaded long line of text.
Boryana
Telerik team
 answered on 04 Aug 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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?