Telerik Forums
UI for WinForms Forum
1 answer
111 views

DISREGUARD:  I found the error and it was in another method that for some reason was coded to alwyas select the last row.


When ever my form is loaded with a radgirdview control on it the row 0 is always selected.  The grid is a multiselect and It is set so the user can select multiple rows and then click a button and all rows that are selected will be updated.

On the form load I have this code
POSSGridView.ClearSelection();
POSSGridView.CurrentRow = null;

and I loop through the rows as follows
foreach (GridViewRowInfo rowInfo in POSSGridView.Rows)
           {
               if (rowInfo.IsSelected)

The issue is when the form loads if I hit the button the .SelectedRows has row 0 in it.  If I select it and then select another row and hit the button not eh .SelectedRows has both rows as being selected even though on the screen the 0 row is not selected.  I am unalbe to find anyway to not have the 0 row selected.
Emanuel Varga
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
217 views
Is there any way to catch a row reorder event?

My grid is in unbound mode, with AllowRowReorder = true.  I need to be able to tell when a user reorders the rows via drag and drop, but the obvious DragDrop event is not hit.  Do I really need to use MouseDown, MouseUp, and lots of calculations of row size and position?


-----------------------------------------------------------

Since posting this I found my answer in your demo:

...
 this.radGridView1.Rows.CollectionChanged += new NotifyCollectionChangedEventHandler(Rows_CollectionChanged);
...

 private void Rows_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Move)
{
for (int i = 0; i < this.radGridView1.Rows.Count; i++)
{
this.radGridView1.Rows[i].Cells["Priority"].Value = i + 1;
}
}
}
Emanuel Varga
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
155 views
are there any third party controls ? I want to build like this
http://allbetsareoff.com/tutorials/creating-an-automated-odometer-part-2/ 

is there any telerik control ?
Emanuel Varga
Top achievements
Rank 1
 answered on 07 Nov 2012
11 answers
603 views
When I'm changing text in textbox - the value in the cell is changing too(at the same time). I use event
private void rtx_TextChanging(object sender, TextChangingEventArgs e)
{
    RadTextBox rtb = sender as RadTextBox;
    string title = rtb.Name.Substring(0, rtb.Name.Length - "textbox".Length);
    this.radLabelElement1.Text = rgv.CurrentRow.Cells[title].Value.GetType().ToString();
    rgv.CurrentRow.Cells[title].Value = e.NewValue;
    rgv.CurrentRow.InvalidateRow();
}
where rtx - radtextbox

What event? I need to use to do the same thing for textboxes - when I change value in the cell the value in textbox changes too. I was trying to use CellValueChanged but it affects only after I press enter
Emanuel Varga
Top achievements
Rank 1
 answered on 07 Nov 2012
2 answers
154 views
I have the text aligned to Top Left and the image aligned to the Bottom Right.  However, the icon always seems to appear above the text and centered.Is this a bug or something I am doing incorrectly?

Thanks,

- Brad
Stefan
Telerik team
 answered on 07 Nov 2012
1 answer
72 views
Hi
I using a RadTreeView and Bind to a Binding List. but after binding ( using DataSource, Child Member, ParentMember, DisplayMember properties ) Drag And Drop Events such as "DragEnded" event not work.

please Full help me by a sample about this prablem !

thanks

Stefan
Telerik team
 answered on 07 Nov 2012
1 answer
211 views
Hi Telerik,
I have assigned some cols as read only in the radgrid(radform) and i used cell formatting to apply colors like this by name:
DTURradGridView.Columns["dtuct0"].ReadOnly = true;
          DTURradGridView.Columns["dtuct1"].ReadOnly = true;
          DTURradGridView.Columns["dtuct2"].ReadOnly = true;
          DTURradGridView.Columns["dtuct3"].ReadOnly = true;
          DTURradGridView.Columns["dtuy"].ReadOnly = true;

if (e.CellElement.ColumnInfo is GridViewDataColumn)
            {
                if (e.CellElement.ColumnInfo.FieldName == "dtuct0" )
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.LightSlateGray;
                    e.CellElement.GradientStyle = GradientStyles.Linear;
                }
                if (e.CellElement.ColumnInfo.FieldName == "dtuct1")
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.LightSlateGray;
                    e.CellElement.GradientStyle = GradientStyles.Linear;
                }
                if (e.CellElement.ColumnInfo.FieldName == "dtuct2")
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.LightSlateGray;
                    e.CellElement.GradientStyle = GradientStyles.Linear;
                }
                if (e.CellElement.ColumnInfo.FieldName == "dtuct3")
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.LightSlateGray;
                    e.CellElement.GradientStyle = GradientStyles.Linear;
                }
                if (e.CellElement.ColumnInfo.FieldName == "dtuy")
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.LightSlateGray;
                    e.CellElement.GradientStyle = GradientStyles.Linear;
                }
            }

Then i want to hide/unhide based on the selection like this:
private void normalToolStripMenuItem_Click(object sender, EventArgs e)//Normal View
        {
            DTURradGridView.Columns["dtuct0"].IsVisible = false;
            DTURradGridView.Columns["dtuct1"].IsVisible = false;
            DTURradGridView.Columns["dtuct2"].IsVisible = false;
            DTURradGridView.Columns["dtuct3"].IsVisible = false;
            DTURradGridView.Columns["dtuy"].IsVisible = false;
 
        }
 
         
 
        private void advancedToolStripMenuItem_Click(object sender, EventArgs e) //Advanced View
        {
            DTURradGridView.Columns["dtuct0"].IsVisible = true;
            DTURradGridView.Columns["dtuct1"].IsVisible = true;
            DTURradGridView.Columns["dtuct2"].IsVisible = true;
            DTURradGridView.Columns["dtuct3"].IsVisible = true;
            DTURradGridView.Columns["dtuy"].IsVisible = true;
 
      
        }
When i Click on Normal Mode function, it applies colors to other cols. This is really strange for me. Please help me, thank you.
Emanuel Varga
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
211 views
Hi,

We are trying to replace a winform propertygrid with a RadPropertyGrid.

Previously, we were binding an object to the property grid, which in turn was displaying all the properties. If one of the properties is a collection it used be displayed in a collectioneditor when invoked from the property value.

Since the Propertygrid is replaced by RadPropertyGrid, we have been unable to do this. Even when one of the properties is returning a collection it the property grid is not providing the means to invoke the collection editor. I feel like we are missing something. 

Thanks in advance
--Rajesh

Ivan Petrov
Telerik team
 answered on 07 Nov 2012
2 answers
63 views
As title.

Data is not populated with columns rows and value configured at design time.
I have to move one or more of the fields from column to row and back again to their original places to retrieve the data.

Also the forum doesn't repaint and fields vanish until form is resized.
Gareth
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
60 views
i have made my own calender on datagrid in such away when i click on any particulat date(which are cell of datagrid) new form is open now i want whenever i clicked on any date it will automatically synchronized with radschedular it allow m to create schedule of particulat date plz help me em struck thanks in advance


regard usman shah
Ivan Todorov
Telerik team
 answered on 07 Nov 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)
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
CheckedDropDownList
ProgressBar
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
NavigationView
VirtualKeyboard
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?