Telerik Forums
UI for WinForms Forum
1 answer
100 views
Hello,Telerik
   Really I meet trouble when I use Radtreeview on winform .
   My business is the order including products,and product belongs to one category,category is tree-structure.
   In the product Adding-Form,I select the category from the Category-tree is OK.
  But When I want to modify the product detail information,How can I locate the current product Category-ID among the Category Tree..
such as

             ProductDAO productDao = new ProductDAO();
            Product product = productDao.GetProductDetailByProductId(productId);
            tbxProductName.Text = product.ProductName;
            tbxProductNote.Text = product.Remark;
            tbxProductPrice.Value = product.Price.Value;
            tbxProductQuantity.Value = (decimal)product.ProductCount.Value;
            tbxUnit.Text = product.Unit;
            ProductCategory proCategory = productDao.GetCategoryByCategoryId(product.ProductCategoryID.Value);
            GotoSelectNode(proCategory.CategoryName);
My Category Tree is :

  private void InitPvProductCategoryTree()
        {
            ProductDAO proDao = new ProductDAO();

            List<ProductCategory> categorys = proDao.GetAllCategoryList("");
            tbxCategroy.DisplayMember = "CategoryName";
            this.tbxCategroy.ValueMember = "ProductCategoryID";
            this.tbxCategroy.ParentIDMember = "ParentID";
            this.tbxCategroy.DataSource = categorys;

            // this.tbxCategroy.DataMember = "Nodes";

        }


How to Implement the method of GotoSelectNode?
My Telerik version is 2010 q3

Thanks .Hope your reply.
Ivan Petrov
Telerik team
 answered on 22 Jun 2011
4 answers
130 views
Hi, I'm currently implementing Copy to Excel functionality and it works great for all but Combo/MultiCombo columns.

I'm trying to implement it in a generic way so I don't want to cast the data source of the combo and find the value from there. Is there a simple way to reach the Displayed data?

Thanks!

private string ConvertDataToString(bool onlySelectedRows)
{
    StringBuilder sbTextData = new StringBuilder();
 
    // Copy columns header
    foreach (GridViewColumn col in this.radGridView.Columns)
    {
        sbTextData.Append(col.HeaderText.Replace("\n", " ") + "\t");
    }
 
    sbTextData.Append("\n");
 
    // Convert only selected rows
    if (onlySelectedRows)
    {
        foreach (GridViewRowInfo row in this.radGridView.SelectedRows)
        {
            int i = 0;
            while (i < row.Cells.Count)
            {
                if (i > 0)
                {
                    sbTextData.Append("\t");
                }
 
                if (row.Cells[i].ColumnInfo is GridViewComboBoxColumn)
                {
                    // Obtain displayed data
                }
                else if (row.Cells[i].Value == null)
                {
                    sbTextData.Append(string.Empty);
                }
                else
                {
                    sbTextData.Append(row.Cells[i].Value.ToString());
                }
 
                i++;
            }
            sbTextData.Append("\n");
        }
    }
    else
    {
        foreach (GridViewRowInfo row in this.radGridView.Rows)
        {
            int i = 0;
            while (i < row.Cells.Count)
            {
                if (i > 0)
                {
                    sbTextData.Append("\t");
                }
 
                if (row.Cells[i].Value == null)
                {
                    sbTextData.Append(string.Empty);
                }
                else
                {
                    sbTextData.Append(row.Cells[i].Value.ToString());
                }
 
                i++;
            }
            sbTextData.Append("\n");
        }
    }
 
    return sbTextData.ToString();
}
Martin Vasilev
Telerik team
 answered on 21 Jun 2011
1 answer
279 views
Hi, I'm looking for a way to modify the AutoComplete mechanism to filter using 'Contains' instead of 'Starts with' when the user types.

I've seen this functionality is available on the ASP.NET and WPF controls, but haven't found a way to use it or implement it my own way with the WinForms controls.

Thanks!
Martin Vasilev
Telerik team
 answered on 21 Jun 2011
2 answers
146 views
Hi, I would like to have a ComboBox column in my grid that would be used as a list of values that the user can select, modify or use a new one.

I mapped the ValueMember to a string property of my custom object and set the DropDownStyle to DropDown. It gets saved properly, but I cannot edit the value nor add a 'custom' one.

I can't find a property that let me do that, am I doing something wrong or that functionality is not present?

Also, I would like to be able to add new lines, as it is possible in the GridViewTextBoxColumn but it doesn't seem possible in the ComboBoxColumn.

Thanks!
Svett
Telerik team
 answered on 21 Jun 2011
1 answer
114 views
Hello,Telerik.
  I want to show list of orders in RadGridView .One order includes columns of orderId,orderName,productId ,etc.
en.How can I show productName (in another list or table in DB,include productId ,productName,etc) in RadGridView with orders ?
Can I customize one virual column of showing productName through some methods?
thanks.Hope your reply.
Svett
Telerik team
 answered on 21 Jun 2011
2 answers
264 views
Hi!
Im using VB.NET and had created a RadPageView with 2 page.

1st page call = A
2nd page call = B

When first time load A is an default selected page.
When i click on page B it will do checking either file is exist.
if not exist than msgbox will popup and use code to select back the page A

Display page of A is correct but the B button is still in selected mode.
Mean i can see 2 page is selected.

My viewmode for the RadPageVIew is STACK

Hope to get the reply soon.

Thank you!

Regards
Johnny
Stefan
Telerik team
 answered on 21 Jun 2011
1 answer
147 views
hi
i am developing an online trading application using telerik winfroms products and i have a very annoying  scenario;
i am using rad Gridview to represent the marked data, when some updates comes from the server i have to update the data in the grid with this feed and change the cell back color based on that data, if the new value is greater than the old value i have to change the cell back color to green and if the new value is less than the old value i have to change the cell back color to red, The problem is i can't change the cell back Color in any method in my form and when i use the CellFormatting event i can't know the old value to make the compare and i can't store this old value in a global variable because its a muti threading  application and the updates come so fast.
any ideas?
thank you
Svett
Telerik team
 answered on 21 Jun 2011
4 answers
253 views

I have a hierarchic GridView and I want to scroll to the selected row after a new databind of the control.
If I do

this.radGridView1.TableElement.ScrollToRow(this.radGridView1.CurrentRow);

no problem if the current row is a parent row but if the current row is a child row the GridView scroll to the end.
How to scroll to a selected child row?
Thanks

Martin Vasilev
Telerik team
 answered on 21 Jun 2011
1 answer
125 views
I am trying to use your combo box that when it is dropped down the contents displayed show two lines of data for each row, but I cannot find out what properties I need to set.

You can see an example found on this page http://www.telerik.com/products/winforms/multicolumncombo.aspx under "Rotating Items on Double-Click."
Stefan
Telerik team
 answered on 21 Jun 2011
3 answers
303 views
Hello.
I have RadGroupBox control placed on RadPageView. The problem is with RadGroupBox colors: in desing mode everything is ok (see desinger.PNG from atachement), but when I run my application, the BackColor of RagGroupBox seems to be from main form instead of PadPage (see running.PNG), so it looks strange.

How to fix this problem?

(version Q1 2011, WinForms)

Thanks in advance.
Darek.
Stefan
Telerik team
 answered on 21 Jun 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
+? 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?