Telerik Forums
UI for WinForms Forum
0 answers
142 views
radPivotGrid1.PivotGridElement.BestFitHelper.BestFitColumns() is not working ㅜㅜ.
what's wrong?

please help me.
lee
Top achievements
Rank 1
 asked on 11 Mar 2013
0 answers
83 views
how change backcolor multicolumncombobox?
I change backcolor but change not any thing
Ali
Top achievements
Rank 1
 asked on 09 Mar 2013
4 answers
246 views
I'm sure i messed this up somehow, but i can't figure out how at this point.

i had a schedule control with resources on it.  they were colored different colors.  it worked fine.

now i added databinding to add appointments to it.  bound to custom business objects.  now everything shows in a weird gray/black shade. see the example.  if i remove databinding it works fine again (of course there's no appointments).

I can't get the appointment summary to show either.  what am i doing wrong for that?  it's there if i double click and edit an appointment the summary/description are there, so i know binding is correct, but it won't show on the appointment itself.

here's my databinding code.  it's all done in code, nothing on the form itself.

			var appointmentMappingInfo = new AppointmentMappingInfo();
			appointmentMappingInfo.BackgroundId = "ApptStatus";
			appointmentMappingInfo.Description = "Description";
			appointmentMappingInfo.End = "EndDate";
			//appointmentMappingInfo.Location = "Location";
			//appointmentMappingInfo.MasterEventId = "ParentID";
			//appointmentMappingInfo.RecurrenceRule = "RecurrenceRule";
			appointmentMappingInfo.ResourceId = "ProviderId";
			//appointmentMappingInfo.Resources = "SchedulerAppointment";
			appointmentMappingInfo.Start = "StartDate";
			//appointmentMappingInfo.StatusId = "StatusID";
			appointmentMappingInfo.Summary = "Subject";
			schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo;
 
 
			var resourceMappingInfo = new ResourceMappingInfo();
			resourceMappingInfo.Id = "Id";
			resourceMappingInfo.Name = "Name";
 
			schedulerBindingDataSource1.ResourceProvider.Mapping = resourceMappingInfo;
 
			_bsAppts = SchedulerRepository.GetAppointments();
 
			schedulerBindingDataSource1.ResourceProvider.DataSource = _opList;
			schedulerBindingDataSource1.EventProvider.DataSource = _bsAppts;
 
 
			schMain.DataSource = schedulerBindingDataSource1;

_opList is a binding list of your Resource object.
_bsAppts is a binding list of my business object appointments

Thanks!

EDIT to get the appintment summary to show, i had to handle the appointmentformatting event and change the forecolor of appointmentelement to black.  i still have the weird color problem above.
Julian Benkov
Telerik team
 answered on 08 Mar 2013
1 answer
118 views
Hello Team
I have a requirement in gridview where user inserts columns to the grid and also removes when ever he wants, when he removes the column i need to delete the column from database, see the below image



when user clicks the contextmenu Remove Field i need to delete the column from the database table

for this i have written  MenuItemRemove.Click += new EventHandler(MenuItemRemove_Click);

void MenuItemRemove_Click(object sender, EventArgs e)
{
  string iColName = radgridview1.CurrentColumn.Name;
// delete query to delete the above column from the database
}

my problem here is i selected fifth column in the grid, and the current column is always returning column index as 0 which means column one, how to capture the selected column index or name when clicked the context menu remove in my example

please help me


Stefan
Telerik team
 answered on 08 Mar 2013
2 answers
201 views
Hi,

I defined a DateTime column with TimePicker editor in a grid.
When I press the clock, the clock editor is opened, the problem is when I leave the cell without closing the editor (pressing the done, in some cases the editor is closed and in some times its still open, even when I am in a different cell (Decimal column for example). I can still change the time in the editor but it's not connect to anything.

This is how I defined the column:
var dateColumnOut = new GridViewDateTimeColumn
         {
             HeaderText = "Date Time Out",
             Name = Data.cJobCardData.JobCardColumns.DateTimeOut,
             FieldName = Data.cJobCardData.JobCardColumns.DateTimeOut,
             Format = DateTimePickerFormat.Long,
             EditorType = GridViewDateTimeEditorType.TimePicker,
             FormatString = "{0: M/d/yyyy h:mm tt}",
             TextAlignment = ContentAlignment.MiddleCenter,
             Width = colWidth
         };

I checked the CurrentCellChange: The event is fired and I can fill the new cell values. Still, the clock editor is opened and I don't know how to close it.

What am I doing wrong ????
Shlomo Pleban
Top achievements
Rank 1
 answered on 07 Mar 2013
4 answers
278 views
How do I get the display text of a cell? (The output of the CellFormatting() event.) Everything seems to return the value in the data source.
Jay
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
245 views
I need to create an UI which allows me to select entries from one list box and add it to another listbox at the run time. Now, the listbox1 may contain combo box and checkbox as the items. For example, if I add a combo box labelled Quarter with values "Q1, Q2, Q3, Q4" as an item in listbox1 and select the entry Q1 in it, and click on the "Add" button, it should be added to listbox2. Vice versa should also be possible. This should be possible at the run time. How could I add combo box and checkbox as an item to the listbox? Also, please suggest if for the add-remove buttons, the code I've is correct. Please look into the attachment for the UI which would help to understand this better.

private void MoveListBoxItems(ListBox source, ListBox destination)
    {
        ListBox.SelectedObjectCollection sourceItems = source.SelectedItems;
        foreach (var item in sourceItems)
        {
            destination.Items.Add(item);
        }
        while (source.SelectedItems.Count > 0)
        {
            source.Items.Remove(source.SelectedItems[0]);
        }
    }

    private void button1_Click(object sender, EventArgs e)
    {
        MoveListBoxItems(listBox1, listBox2);
    }

    private void button2_Click(object sender, EventArgs e)
    {
        MoveListBoxItems(listBox2, listBox1);
    }
Peter
Telerik team
 answered on 07 Mar 2013
3 answers
204 views
Hi,

I have a RadMaskedEditBox bound to BindingSource which is connected to some column with numeric (Int32) in DataTable in some DataSource.
Values are properly displayed in the control, but I want users to be able to nullify the column value in the table
by deleting existing value from the RadMaskedEditBox and leaving it empty.
Is there any way of configuring RadMaskedEditBox to achieve this? Or maybe some other control is better for the job?
This feature does not exist in standard WinForms TextBox and I am currently searching for the controls that would do that task without any tweaking etc.

Thanks,
Piotr
Peter
Telerik team
 answered on 07 Mar 2013
6 answers
177 views
Hi

I'm having an issue trying to delete appointments programmatically. What I'm doing is handling the AppointmentAdded Event and contrasting the appointment subject (which will contain someones name) against a DB. If the appointment subject (Name) does not appear in the aforementioned DB, then the appointment must be deleted. The problem is that the appointment refuses to be deleted.

Here's the code that I'm using:
Private Sub RadScheduler1_AppointmentAdded(sender As Object, e As Telerik.WinControls.UI.AppointmentAddedEventArgs) Handles RadScheduler1.AppointmentAdded
      Dim app As AppointmentWithPhone = TryCast(e.Appointment, AppointmentWithPhone)
 
      If NameExistsInDB(app.Subject) = False Then
          Debug.WriteLine("Before: " & RadScheduler1.Appointments.Count)
 
          Me.RadScheduler1.Appointments.Remove(app)
 
          Debug.WriteLine("After: " & RadScheduler1.Appointments.Count)
      End If
  End Sub

The output in both debug cases is the same. If I have two appointments and add a third with a name that does not exist in the DB (thus forcing my application to enter inside the "IF") I get this:

Debug output:
Before: 3
After: 3


Can you help me out? Am I doing it the right way or is there some other way to delete an appointment?
Thanks!
Ivan Petrov
Telerik team
 answered on 07 Mar 2013
2 answers
188 views
Hello, 

I'm Using Telerik For WinForms Q1 2013 . i've Filtered GridView with Excel Like Filtering . 

i want send Filtered Rows to a DataTable and After that  send dataTable to StimulReport . 

My Problem is i want send filtered rows exactly not all of rows and records , 

is there possible ? how can i do that ?
Svett
Telerik team
 answered on 07 Mar 2013
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?