Telerik Forums
UI for WinForms Forum
2 answers
100 views
How can I get a handle to the appointment(s) in the RadAlarmForm?
I'm trying to get the appointment(s) to mark them as dismissed.

Thanks!
Dobry Zranchev
Telerik team
 answered on 17 Mar 2011
2 answers
222 views
Hi guys,
I am getting this strange error and I am really pulling my hair at the moment. My scenario is simple. I have a drop down list for Categories. When the user Selects and category, I populate another drop down list of subcategory based on the selected category.
Here is the code
private void ddlCategory_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {  
            this.PopulateSubCategories();
        }
 
 private void PopulateSubCategories()
        {           
            DataTable dtSubCategories = new SubCategory().GetSubCategoryByCategoryID(Convert.ToInt64(ddlCategory.SelectedItem.Value));
            DataRow dr = dtSubCategories.NewRow();
            dr["ID"] = 0;
            dr["Name"] = "Any";
            dr["CategoryID"] = 0;
            dr["isACtive"] = true;
            dtSubCategories.Rows.InsertAt(dr, 0);
 
            this.ddlSubCategory.DataSource = dtSubCategories;
            this.ddlSubCategory.DisplayMember = "Name";
            this.ddlSubCategory.ValueMember = "ID";
            this.ddlSubCategory.SelectedIndex = 0;
        }

The problem is that ddlCategory.SelectedItem.Value statement throws exception, Unable to cast object of type 'System.Data.DataRowView' to type 'System.IConvertible'. If i skip this function first time and change the index to some other than it works fine. Why is it not returning the SelectedValue on first bind
Thanks
Afraz Ali
Peter
Telerik team
 answered on 17 Mar 2011
2 answers
167 views
Hello,

I encounter very strange problem while using the Telerik GridView.
I am creating the gridview on the fly & then populating the data in those gridviews.

Bydefault I am showing one row in each gridview as selected through programming.
The grid which contains the horizontal scroll bar & when I am looking at the source code of that grid, I am getting the following value which I am using in my jquery to findout the selected index of that specific grid from the 'value' attribute.

<input name="rg_02635_ClientState" id="rg_02635_ClientState" type="hidden" 
autocomplete="off" 
value="{"selectedIndexes":["33"],"reorderedColumns":[],"expandedItems":[],"expandedGroupItems":[],"expandedFilterItems":[],"deletedItems":[],"scrolledPosition":"768,0","popUpLocations":{},"draggedItemsIndexes":[]}"/><BR><BR>

But for the grid which doesn't contain the horizontal scroll bar & when I am looking at the source code of that grid, I am getting the following value, even if I have selected row in the grid.

<input name="rg_02637_ClientState" id="rg_02637_ClientState" type="hidden" 
autocomplete="off"/><BR>


Strange thing is, if I select the highlighted row one more time manually, then I am able to see the following value.
<input name="rg_02637_ClientState" id="rg_02637_ClientState" type="hidden" 
autocomplete="off" 
value="{"selectedIndexes":["0"],"reorderedColumns":[],"expandedItems":[],"expandedGroupItems":[],"expandedFilterItems":[],"deletedItems":[],"scrolledPosition":"0,0","popUpLocations":{},"draggedItemsIndexes":[]}"/><BR>

Why is this strage behaviour? How do I get the selectedIndex for the grid which doesn't contain horizontal scroll.

Looking forward to your response.

Best Regards,
Vishal

vishal
Top achievements
Rank 1
 answered on 17 Mar 2011
2 answers
329 views
Good morning!

My version of the telerik is RadControls for ASP.NET Ajax 2010 Q3.

I'm trying to remove columns that are inserted with the command gridProntuarios.MasterTableView.Columns.Add() of grid through the command "gridProntuarios.MasterTableView.Columns.Clear();" and
"gridProntuarios.Columns.Clear();" but don't work.

What would the solution for this trouble?

Thanks!
Mira
Telerik team
 answered on 17 Mar 2011
1 answer
119 views
Please, see the subject.

Is it possible? Any help, please.

Ivan Todorov
Telerik team
 answered on 17 Mar 2011
1 answer
72 views
Hi,

i create an appointment with Start time:  9:00 Am 10-Mar-2011 and End time 9:05 Am 10-Mar-2011. Another appointment is also create on the same day with Start time:  9:10 Am 10-Mar-2011 and End time 9:15 Am 10-Mar-2011. In Week view, scheduler shows the second appointment in 11-Mar-2011 column. I want the second appointment to be shown on the 10-Mar-2011 column since its the appointment for that day.
 I am using RadControl Q1 2010 SP2 version. Please specify the solution for this version, since its the version that is available in our organization. Please consider this urgent since this is a very critical issue for our application

Regards
Nitin
Nikolay
Telerik team
 answered on 17 Mar 2011
4 answers
140 views
I have a listcontrol set to MultiExtended. When the user clicks on an item the SelectedIndexChanged event fires. However, if the user holds the shift key down and clicks another item, selecting all items between clicks, the event does not fire.  I need to know that the user just added items to the SelectedItems list. What event can I use?  Thanks

Later
Art
Richard Slade
Top achievements
Rank 2
 answered on 16 Mar 2011
3 answers
132 views
I am experiencing the follow problem with the MultiColumn ComboBox control.
First I setup the MultiColumn ComboBox as follows:

 
CategoryRadMultiColumnComboBox.DataSource = _categoriesBindingSource; 
CategoryRadMultiColumnComboBox.DisplayMember = "CategoryName"
CategoryRadMultiColumnComboBox.ValueMember = "CategoryId"
CategoryRadMultiColumnComboBox.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; 
 
RadMultiColumnComboBoxElement categoriesElement = CategoryRadMultiColumnComboBox.MultiColumnComboBoxElement;          
categoriesElement.EditorControl.MasterGridViewTemplate.AutoGenerateColumns = false;       
categoriesElement.EditorControl.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;           
categoriesElement.EditorControl.MasterGridViewTemplate.Columns.Clear(); 
categoriesElement.Columns.Add(CreateGridViewDataColumn("StandardId")); 
categoriesElement.Columns.Add(CreateGridViewDataColumn("CategoryId")); 
categoriesElement.Columns.Add(CreateGridViewTextBoxColumn("#""CategoryNumber", 30, 30)); 
categoriesElement.Columns.Add(CreateGridViewTextBoxColumn("Name""CategoryName", 100)); 

On the SelectedIndexChange event of another ComboBox I set the filter for the datasource as follows:

private void StandardRadMultiColumnComboBox_SelectedIndexChanged(object sender, EventArgs e) 
            RadMultiColumnComboBox cbo = (RadMultiColumnComboBox)sender; 
            _categoriesBindingSource.Filter = String.Format("StandardId = '{0}'", cbo.SelectedValue.ToString()); 
             
            RadMultiColumnComboBoxElement categoriesElement = CategoryRadMultiColumnComboBox.MultiColumnComboBoxElement; 
             
            if (categoriesElement.Rows != null && categoriesElement.Rows.Count == 0 && CategoryRadMultiColumnComboBox.SelectedItem != null
            { 
                CategoryRadMultiColumnComboBox.SelectedItem = null
                CategoryRadMultiColumnComboBox.SelectedValue = null
                CategoryRadMultiColumnComboBox.Text = " "
            }             

Now when the filtering results in 0 rows in the DataSource the Text property retains the previous value and I can not seem to clear it not matter what properties I change.
Jack
Telerik team
 answered on 16 Mar 2011
1 answer
122 views

Hello,

I'm a new developer of winforms.
I'm trying to insert, update and delete records from the following xml file using the treeview control (I'm using the 2009.3.9.1203 version):

"

<?xml version="1.0" encoding="utf-16"?>
<uTemplateData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://********************************************">
  <GoodData xmlns:dppp2="http://***************************************************************************">
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>73111160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>7311160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
  
  </GoodData>
</uTemplateData>

 

"
You see that the above xml is more complex than the xml file which supported the treeview (XMLSerialization demo).
So, I'm asking you as new developer of winforms to help me step by step in order to insert, update and delete records from the above xml.

If the treeview is not intended for supporing such xml files, Please, guide me how to achieve the requirement using another control.

It is appreciated to send me a code with an explaination.

Regards,
Bader

Martin Vasilev
Telerik team
 answered on 16 Mar 2011
3 answers
161 views

Hello,

I'm a new developer of winforms.
I'm trying to insert, update and delete records from the following xml file using the radgridview control (I'm using the 2009.3.9.1203 version):

"

<?xml version="1.0" encoding="utf-16"?>
<uTemplateData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://********************************************">
  <GoodData xmlns:dppp2="http://***************************************************************************">
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>73111160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>7311160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
  
  </GoodData>
</uTemplateData>

"
You see that the above xml is more complex than the xml file which supported the radgridview.
So, I'm asking you as new developer of winforms to help me step by step in order to insert, update and delete records from the above xml.

If the radgridview is not intended for supporing such xml files, Please, guide me how to achieve the requirement using another control.

It is appreciated to send me a code with an explaination.

Regards,
Bader

Martin Vasilev
Telerik team
 answered on 16 Mar 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
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?