Telerik Forums
UI for WinForms Forum
1 answer
200 views
Hello everybody

I've problem with radgridview.. Can i set auto collapse group in radgridview? Because i set the properties "AutoExpandGroup" to "False" but this code doesn't happen.. Can you give me another solution?

Cheers..
Stefan
Telerik team
 answered on 12 Jun 2012
1 answer
201 views
I'm currently developing a Word 2010 VSTO Document-Level Add-In that has to do extended operations on the open document. As these operations can take some seconds to complete, I'd like to indicate this to the users (so they don't get nervous and start clicking wildly around...). 

I've used the Telerik WPF RadBusyIndicator in a WPF project some time ago and really liked how easy it was to implement (and didn't obscure my code as well). It would be great if I could create the same effect using Telerik WinForms/WPF components.

Currently, the main thread directly operates on the document. I have not much experience in threaded programming, but I'd like to implement a clean and reusable solution that does not clutter the important part of my code. 

cheers
Nicolas
Boryana
Telerik team
 answered on 12 Jun 2012
1 answer
720 views
Hello
I used a datatable for fill Grid.
I add row in datatable in my Code and I want to show  changes in my Grid.
for this work I used "dt.AcceptChanges()".
but i need used "dt.GetChanges()".
Because I use "dt.AcceptChanges() ", " dt.GetChanges()" is empty.
Now how do I use "dt.GetChanges()".

Julian Benkov
Telerik team
 answered on 12 Jun 2012
2 answers
396 views
I have a large set of data with which server-side paging is implemented.  I need to requery the data source any time the GridView's filter is changed by the user.  The problem lies in the fact that rebinding the DataSource inside any of the FilterChanged, FilterChanging, or FilterExpressionChanged events of the grid causes a null reference exception at the application level.

To work around this, I have found the following code which will correctly refresh the data source after a filter change has been finalized.

private void TicketView_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    if ((sender as GridViewEditManager).GridViewElement.CurrentCell is GridFilterCellElement)
    {
        RequeryGridData();
    }
}

While the data source now refreshed automatically on a text change, it still did not refresh on a filter type change (ie. "Contains" to "Does not contain").  I tried calling RequeryGridData() in the closed event of the filter popup menu as follows.

private void TicketView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenuProvider is GridFilterCellElement)
    {
        e.ContextMenu.DropDownClosed +=
        new RadPopupClosedEventHandler(FilterContextMenu_Closed);
    }
}
 
void FilterContextMenu_Closed(object sender, EventArgs e)
{
    RequeryGridData();
}

This still caused a null reference exception.  I wondered what would happen if I delayed the datasource refresh until after the close event had finished and found myself with this code.

private void TicketView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenuProvider is GridFilterCellElement)
    {
        e.ContextMenu.DropDownClosed +=
        new RadPopupClosedEventHandler(FilterContextMenu_Closed);
    }
}
 
void FilterContextMenu_Closed(object sender, EventArgs e)
{
    //HACK: Have to refresh grid contents, but MUST NOT do it from a filter changing event as
    //      updating the datasource while the filter change is finalized crashes the program
    System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
    timer.Interval = 1;
    timer.Tick += new EventHandler(FilterChangedTimer_Tick);
    timer.Start();
}
 
void FilterChangedTimer_Tick(object sender, EventArgs e)
{
    (sender as System.Windows.Forms.Timer).Dispose();
    RequeryGridData(); 
}

Which, as I suspected, works great.  No exceptions occurred.

My question is: Is there a cleaner way of detecting the filter change and performing a datasource change?  Perhaps this functionality is not the intended use of the GridView's filter controls, in which case I'll settle for the solution (read: hack) I've managed to come up with, but hopefully there is a better way to handle this.

Thank you for your time.
Chris Ward
Top achievements
Rank 1
 answered on 11 Jun 2012
0 answers
71 views
Dear Ivan Petrov

thanks a lot for your answer it was very useful, now I have an other problem, I want to change alignment to right, I searched and found a suggest, but it wasn't any useful for me, and I want to get color to get rectangle, but argb color's property is read only and I can't to do this and totally I want to change properties in the print for example : get page border, get alignment, get color, etc. but I can't do it.
would you can help me.
best regard.
Maryam
Maryam
Top achievements
Rank 1
 asked on 11 Jun 2012
2 answers
478 views
Hi
I used PropertyGrid . I defined item that is type of boolean and want to get value change and store this value in datatable 
i can't find property value in this event and don't know how to use GetValue(radProperty) .
How can do this ?
Atefeh
Top achievements
Rank 1
 answered on 11 Jun 2012
2 answers
143 views
Hi,
Using a radtreeview with an access db with my data in a recursiv datatable, I would like to go through each element of the radtreeview to retrieve the displaymember and do some additional processes. Something like:
foreach(.... )
{
Parent -> go through each child of it -> if there are grandchildren-> go through each grandchild of child...
get_the_displayname_and_print_it()
.... do whatever...
}
and so on.
Can someone give me some support in this issue?
Thanks
Karl

Karl
Top achievements
Rank 1
 answered on 10 Jun 2012
3 answers
461 views

 

 

Hi.
I used RadDropDownListEditor  in my gridview.when press tab Key and enter it,and start write with keyboard
i have a problem.but when enter this cell with Mouse I don't have any problem.
I used RadDropDownListEditor  in ver2011 and don't have any problem.
but now Use ver2012.this problem is exist.


private
void GrdCheck_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)

 

{

 

 

    if (GrdCheck.CurrentColumn is GridViewComboBoxColumn)

 

    {

 

 

        if (GrdCheck.CurrentColumn.Name.ToString() == "BankRef")

 

            {

 

 

            RadDropDownListEditor comboBoxEditor = this.GrdCheck.ActiveEditor as RadDropDownListEditor;

 

 

 

            if (comboBoxEditor != null)

 

            {

                comboBoxEditor.EditorElement.StretchVertically =

 

false;

 

                comboBoxEditor.DropDownStyle = Telerik.WinControls.

 

RadDropDownStyle.DropDownList;

 

                comboBoxEditor.DropDownSizingMode =

 

SizingMode.UpDownAndRightBottom;

 

            }
            }
    

 

}

 

}

 

 

 

private void GrdCheck_CellEditorInitialized(object sender, GridViewCellEventArgs e)

 

{

 

 

    if (GrdCheck.CurrentColumn.Name.ToString() == "BankRef")

 

    {

 

 

        RadDropDownListEditor cmb = GrdCheck.ActiveEditor as RadDropDownListEditor;

 

 

 

        if (cmb != null)

 

        {

            ((

 

RadDropDownListEditorElement)(cmb).EditorElement).DisplayMember = "Descr";

 

            ((

 

RadDropDownListEditorElement)(cmb).EditorElement).ValueMember = "Id";

 

 

            ((

 

RadDropDownListEditorElement)(cmb).EditorElement).DataSource =DtBankCheck;

 

            ((

 

RadDropDownListEditorElement)(cmb).EditorElement).SelectedIndex = -1;

 

            ((

 

RadDropDownListEditorElement)(cmb).EditorElement).ShowPopup();

 

        }

    }
}

Peter
Telerik team
 answered on 08 Jun 2012
4 answers
1.2K+ views
Hi:

I found a way to disable wimform's close button on codeproject

http://www.codeproject.com/KB/cs/DisableClose.aspx

but it's not working  on R.A.D form (Q1 2009 SP1)  with vista theme.

can you provide a way to disable close button of R.A.D form?

thanks.
Ivan Petrov
Telerik team
 answered on 08 Jun 2012
1 answer
196 views
I am using a Web Method to fill a telerik combobox that is in a user control. (see http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx ).  I would like to put the Web Method code in the code behind for the user control rather than the mainpage code.   

<telerik:RadComboBox ID="RadComboBox4" runat="server" Width="250px" Height="150px"
                EmptyMessage="Select a Company" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
                EnableVirtualScrolling="true"
>
                
<WebServiceSettings Method="GetCompanyNames" Path="defaultcs.aspx" />
</telerik:RadComboBox>


So for the path, I would like to put: Path = "usercontrol1.ascx" rather than Path = "defaultcs.aspx", but it cannot find the web method.  Is it possible for a user control to call a web method that is in the code behind for the user control?

Ivana
Telerik team
 answered on 08 Jun 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
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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?