Telerik Forums
UI for WinForms Forum
1 answer
107 views
I am using a GridView which has filtering enabled. The GridView control itself is bounded to data via the following command:

radGridView1.DataSource = db.AppUsage(1, new DateTime(2011, 2, 10), new DateTime(2011, 5, 11));


This correctly populates the GridView with rows. If I click on the funnel icon in the column headers, I get presented with a checkbox treeview structure, listing all the distinct values. From here, I am able to check/uncheck values to set the filter accordingly. This is good.

However, if I drill down on these rows such that a child template is loaded via "load on demand" / "lazy loading", when clicking on the funnel icon in the child GridView, the checkbox treeview structure only contains the "All" item, and no other values. I would like to see a list of checkboxes with all the distinct values, in the same way as the parent template.

Please see screenshots.

Note that the child template is populated via the RowSourceNeeded eventhandler, and creates rows by iterating over a result set (i.e. the DataSource property is not set for the child template):

void radGridView1_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
{
    GridViewRowInfo rowInfo = e.ParentRow;
    String packageId = rowInfo.Cells["PackageId"].Value.ToString();
    String parentPackageId = rowInfo.Cells["ParentPackageId"].Value.ToString();
 
    WorkspaceMiQEntities db = new WorkspaceMiQEntities();
 
    foreach (var u in db.Usage(1, new DateTime(2011, 2, 10), new DateTime(2011, 5, 11), null, Int32.Parse(packageId), null, Int32.Parse(parentPackageId)))
    {
        GridViewRowInfo row = e.Template.Rows.NewRow();
 
        row.Cells["StartDateTime"].Value = u.StartDateTime;
        row.Cells["EndDateTime"].Value = u.EndDateTime;
        row.Cells["UserName"].Value = u.UserName;
        row.Cells["DomainName"].Value = u.DomainName;
        row.Cells["DeviceName"].Value = u.DeviceName;
 
        e.SourceCollection.Add(row);
    }
    db.Dispose();
     
}
I'd appreciate your help on this.

Thanks in advance.

Martin Vasilev
Telerik team
 answered on 17 May 2011
2 answers
129 views
I was trying to theme the RadTrackBar control using Visual Style Builder (VSB). The Theme previews well in the VSB preview window but when i load the theme in my app the TrackBar appears themeless???
I tried to change the properties of the elements (like BackColor, SliderAreaGradientColor...etc) directly in VSB ...but still the trackbar shows up with no theme although other controls (RadScrollbar, Radbutton...etc) take on the theme normally.
I also tried the Desert.tssp theme...same problem...the trackbar theme is not complete. The SldierAreaGradientColors and TickColor appears like the windows defaults, which is light blue.
Any help is very appreciated, because otherwise i'll have to complete the missing theme properties within the properties windows of the control in visual studio....
Ivan Petrov
Telerik team
 answered on 17 May 2011
5 answers
524 views
I have a radgridview that I want to change the background color of three columns depending on the value of the cells. The following code works great for changing the colors of the cells based on its value, however if i click into the cell all the formatting for that cell is lost. Is there something we are missing here?

Private Sub rgvTimeCards_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgvTimeCards.CellFormatting
        Dim amtIndex As Integer = rgvTimeCards.Columns("BillableAmount").Index
        Dim hrsIndex As Integer = rgvTimeCards.Columns("MarkUpHrs").Index
        Dim dollarsIndex As Integer = rgvTimeCards.Columns("MarkUpDollars").Index
        If e.CellElement.ColumnIndex.Equals(hrsIndex) Or e.CellElement.ColumnIndex.Equals(dollarsIndex) Then
            If rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.Pink
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            ElseIf rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value > 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.FromArgb(219, 230, 145)
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            Else
                e.CellElement.DrawFill = False
            End If
        ElseIf e.CellElement.ColumnIndex.Equals(amtIndex) Then
            If rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.Pink
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            Else
                e.CellElement.DrawFill = False
            End If
        End If
    End Sub
sanjeev
Top achievements
Rank 1
 answered on 17 May 2011
1 answer
122 views
Hello there. 

I have successfully used the RadScheduler component to display tasks on a daily, weekly and monthly basis. 

If the subject text displayed for the task does not fit onto the item shown in the scheduler, is there a way to make it autosize so all text is visible
Ivan Todorov
Telerik team
 answered on 16 May 2011
1 answer
470 views
There is a nice useful snippet when using standard MS combobox to track current selected item in a table based on the current selected item of the combobox. This snippet can be accessed using VS 2008 and upward i dont know about 2005. (InsertSnippet> Data - LinQ/XML/Desinger/ADO.NET blah blah> Designer Features and ADO.net> ConvertBindingsource.Current to a specific row in a DataTable)

Using the standard VS shipped combobox it works giving me the option to define it like this:
Dim row As MyProjectDataSet.tblStaffRow<br>        row = CType(CType(Me.ComboBoxStaff.SelectedItem, DataRowView).Row, MyProjectDataSet.tblStaffRow)
and then Dim for example put it into a variable like:
myArrayVariable.Add(row.StaffName)

This however doesn't work for telerik q1 2011 winform RadDropDownList. can anyone help me with this?
Peter
Telerik team
 answered on 16 May 2011
3 answers
181 views
Hi,

We would like to use telerik winform controls. So we start to test demo version.
We have a strange issue about the RadComboBoxElement placed on radribbonbar.

When I use the autocompletemod with SuggestAppend option at the first bind something happen with the popup list. (image attached wrong.png). When I click the arrow of the texbox part of the combobox,  the popup hide, after a click again the popup part shows correctly. (image attached good.png)

We use this event:

  
private void comboboxSearchAddress_TextChanged(object sender, EventArgs e)
        {
            if (comboboxSearchAddress.Text.Length > 2)
            {
  
                List<AddressPointType>
                    liAddrs = AddressPoint.SearchAddress(comboboxSearchAddress.Text);
  
                string s = comboboxSearchAddress.Text;
                 comboboxSearchAddress.Text = "";
                 comboboxSearchAddress.Items.Clear();
                for (int i = 0; i < liAddrs.Count; i++)
                {
                     
                    comboboxSearchAddress.Items.Add(new RadComboBoxItem(liAddrs[i].Caption,liAddrs[i]));
  
                }
                comboboxSearchAddress.Text = s;
                comboboxSearchAddress.Select(comboboxSearchAddress.Text.Length, 0);
                
            }
        }



Any Idea appreciate.
Thanks.
Csaba

Stefan
Telerik team
 answered on 16 May 2011
1 answer
228 views
I am looking for any WinForms or WPF Telerik control which is similar to RadEditor for ASP.Net AJAX. That is user can design their page and retrieve the designed page as HTML as in RadEditor.



Boby
Telerik team
 answered on 16 May 2011
7 answers
347 views

Hello.. how are you..

i have the next scene.. i have a grid nest into the other grid i am using the tools to export of telerik.. its a example:

 

public void Export(String sFilepath, RadGridView grvExportExcel)

{

ExportToExcelML exporter = new ExportToExcelML(grvExportExcel);

exporter.SummariesExportOption = SummariesOption.ExportAll;

exporter.RunExport(sFilepath);

}

but its doesn't work .. when i run this function its make the file succesfully but only export the primary grid and the template not...
i need export all information of the grid... if somebody can help me.. i will pleasure.. for your help.

 

public void Export(String sFilepath, GridViewTemplate grvtExportExcel)

{

RadGridView rgvGrid = new RadGridView();

foreach (GridViewDataColumn c in grvtExportExcel.Columns)

{

rgvGrid.Columns.Add(c);

}

foreach (GridViewDataRowInfo d in grvtExportExcel.Rows)

{

rgvGrid.Rows.AddNew(d);

}

ExportToExcelML exporter = new ExportToExcelML(rgvGrid);

exporter.SummariesExportOption = SummariesOption.ExportAll;

exporter.RunExport(sFilepath);

}

}

but its doesn't work neither....

regards...
thanks for your help.

Martin Vasilev
Telerik team
 answered on 12 May 2011
3 answers
139 views
Hello,

I've evaluated your GridView and I'm on the point to buy the WinForms controlls.
But some issues are still unresolved on my site. I'd really appreciate if you can give some advices to the following points:
  • Why is the first line with a TextBox column not painted correctly? After collapse and expand is the content correct
  • For a custom editor I derrive from BaseCustomEditor and the for the element from RadTextBoxItem
    As usual some keys such as backspace or delete are not effecting to the KeyPress event on the RadTextBoxItem. Therefore I tried to override ProcessCmdKey. But the overridden method will be never called
  • When the textbox columns change their values I want also that the bound data is changed. How can I achieve that?
  • In the CellBeginEdit method I set the height of the row to a specific value. But if I set the value above 156px a NullReferenceException is thrown. But why? I want to be able to set every height.

All listed points above have a corresponding todo comment in the attached sample project.
http://www.danflash.com/files/code/GridViewEvaluation.zip

Thank you very much.
Kind regards,
Danny
Alexander
Telerik team
 answered on 12 May 2011
1 answer
99 views
HI,

I have a  winform gridview controls which displays the row details in custom view in the bottom (ref -  custom views winform demo)
I need to to display another grid in custom view.
(see the screen shot attached)

Thanks.
Svett
Telerik team
 answered on 12 May 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)
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
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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?