I have a listview with custom listitems that include a radButtonElement. How do I change the backcolor of the button? I've tried
Me.MatchButtonElement.ButtonFillElement.BackColor = Color.LightGreen
Me.MatchButtonElement.ButtonFillElement.BackColor2 = Color.LightGreen
Me.MatchButtonElement.ButtonFillElement.BackColor3 = Color.FromArgb(122, 223, 136)
Me.MatchButtonElement.ButtonFillElement.BackColor4 = Color.FromArgb(142, 237, 143)
and various other approaches but nothing has worked so far.
Please let me know where I am going wrong!
I've tried many ways, but for some reason when I test my maskedit field, I can't type anything in. No values are displayed as I type and the IFrame cursor doesn't move as I type. I can only Tab off the field.
Input: 1 - 999
-----------------------------
Mask: nnn
Type: Numeric
Prompt Char: 0
---------------------------
On line 7 below, the field doesn't get set to "001"
01.
Private
Sub
mtxtDaysElapsed_Validating(sender
As
Object
, e
As
System.ComponentModel.CancelEventArgs)
Handles
mtxtDaysElapsed.Validating
02.
'between 1 and 999 exclusive
03.
Dim
nDaysElapsed = 0
04.
05.
Try
06.
If
mtxtDaysElapsed.Value =
""
Or
mtxtDaysElapsed.Value =
"0"
Then
07.
mtxtDaysElapsed.Value =
"001"
08.
End
If
09.
If
Integer
.TryParse(mtxtDaysElapsed.Value, nDaysElapsed)
Then
10.
recPoVenmst.LateCutoffDays = nDaysElapsed.ToString
11.
Else
12.
e.Cancel =
True
13.
End
If
14.
Catch
ex
As
Exception
15.
'error
16.
End
Try
17.
End
Sub
Hi,
Looks like I can't use Week, Hour, Minute and Second as a step for QueryableDateTimeGroupDescription, it is not implemented yet?
Alex
Hi
I have a column with multiple data types. I'm using the EditorRequired event to set the editor as a RadDateTimeEditor or RadDropDownListEditor using the code below. This mostly works but I have two problems.
1. With the country dropdown, I set dropDownStyle to DropDown. The editor allows me to type in any value but if the value is not one of the items in the list, as soon as I exit the cell the value disappears.
2. With the RadDateTimeEditor, I set the customFormat to "d" but when I select a value and exit the cell, it's showing the time as well as the date. How do I get it to show date only?
Private maritalStatuses() As String = {"Married", "In a De Facto Relationship", "Interdependent Relationship", "Engaged", "Separated", "Divorced", "Widowed", "Never Married"}
Private Countries() as String = {"", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola"}
Private Sub dgv_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles dgv.EditorRequired
If dgv.CurrentColumn.Name = "ImportValue" Then
Select Case dgv.CurrentRow.Cells("EditorType").Value
Case radEditorType.DatePicker
Dim editor As RadDateTimeEditor = New RadDateTimeEditor
editor.CustomFormat = "d"
e.Editor = editor
Case radEditorType.CountryDropDown
Dim editor As New RadDropDownListEditor
editor.DropDownStyle = RadDropDownStyle.DropDown
DirectCast(editor.EditorElement, RadDropDownListEditorElement).DataSource = Countries
DirectCast(editor.EditorElement, RadDropDownListEditorElement).AutoCompleteMode = AutoCompleteMode.SuggestAppend
e.Editor = editor
Case radEditorType.MaritalStatusDropDown
Dim editor As New RadDropDownListEditor
DirectCast(editor.EditorElement, RadDropDownListEditorElement).DataSource = maritalStatuses
editor.DropDownStyle = RadDropDownStyle.DropDownList
e.Editor = editor
End Select
End If
End Sub
I want a neat display of "cards" as shown in the attached image. I will say how many cards per row and how many rows.
how would i do this with radgrid for winforms?
(this image is taken from a competitive product)
hi everyone
i use Scheduler in project and i have problem in shamsi Scheduler?
everyting in ok but month is not shamsi
i use this code
private
readonly
Calendar cal;
private
readonly
Calendar[] optionals;
public
PersianCulture()
:
this
(
"fa-IR"
,
true
)
{
}
public
PersianCulture(
string
cultureName,
bool
useUserOverride)
:
base
(cultureName, useUserOverride)
{
//Temporary Value for cal.
cal =
base
.OptionalCalendars[0];
//populating new list of optional calendars.
var optionalCalendars =
new
List<Calendar>();
optionalCalendars.AddRange(
base
.OptionalCalendars);
optionalCalendars.Insert(0,
new
PersianCalendar());
Type formatType =
typeof
(DateTimeFormatInfo);
Type calendarType =
typeof
(Calendar);
PropertyInfo idProperty = calendarType.GetProperty(
"ID"
, BindingFlags.Instance | BindingFlags.NonPublic);
FieldInfo optionalCalendarfield = formatType.GetField(
"optionalCalendars"
,
BindingFlags.Instance | BindingFlags.NonPublic);
//populating new list of optional calendar ids
var newOptionalCalendarIDs =
new
Int32[optionalCalendars.Count];
for
(
int
i = 0; i < newOptionalCalendarIDs.Length; i++)
newOptionalCalendarIDs[i] = (Int32)idProperty.GetValue(optionalCalendars[i],
null
);
optionalCalendarfield.SetValue(DateTimeFormat, newOptionalCalendarIDs);
optionals = optionalCalendars.ToArray();
cal = optionals[0];
DateTimeFormat.Calendar = optionals[0];
DateTimeFormat.MonthNames =
new
[] {
"فروردین"
,
"اردیبهشت"
,
"خرداد"
,
"تیر"
,
"مرداد"
,
"شهریور"
,
"مهر"
,
"آبان"
,
"آذر"
,
"دی"
,
"بهمن"
,
"اسفند"
,
""
};
DateTimeFormat.MonthGenitiveNames =
new
[] {
"فروردین"
,
"اردیبهشت"
,
"خرداد"
,
"تیر"
,
"مرداد"
,
"شهریور"
,
"مهر"
,
"آبان"
,
"آذر"
,
"دی"
,
"بهمن"
,
"اسفند"
,
""
};
DateTimeFormat.AbbreviatedMonthNames =
new
[] {
"فروردین"
,
"اردیبهشت"
,
"خرداد"
,
"تیر"
,
"مرداد"
,
"شهریور"
,
"مهر"
,
"آبان"
,
"آذر"
,
"دی"
,
"بهمن"
,
"اسفند"
,
""
};
DateTimeFormat.AbbreviatedMonthGenitiveNames =
new
[] {
"فروردین"
,
"اردیبهشت"
,
"خرداد"
,
"تیر"
,
"مرداد"
,
"شهریور"
,
"مهر"
,
"آبان"
,
"آذر"
,
"دی"
,
"بهمن"
,
"اسفند"
,
""
};
DateTimeFormat.AbbreviatedDayNames =
new
string
[] {
"یکشنبه"
,
"دوشنبه"
,
"ﺳﻪشنبه"
,
"چهارشنبه"
,
"پنجشنبه"
,
"جمعه"
,
"شنبه"
};
//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
DateTimeFormat.ShortestDayNames =
new
string
[] {
"یکشنبه"
,
"دوشنبه"
,
"ﺳﻪشنبه"
,
"چهارشنبه"
,
"پنجشنبه"
,
"جمعه"
,
"شنبه"
};
//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
DateTimeFormat.DayNames =
new
string
[] {
"یکشنبه"
,
"دوشنبه"
,
"ﺳﻪشنبه"
,
"چهارشنبه"
,
"پنجشنبه"
,
"جمعه"
,
"شنبه"
};
DateTimeFormat.AMDesignator =
"ق.ظ"
;
DateTimeFormat.PMDesignator =
"ب.ظ"
;
/*
DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";
DateTimeFormat.LongDatePattern = "yyyy/MM/dd";
DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy/MM/dd"}, 'd');
DateTimeFormat.SetAllDateTimePatterns(new[] {"dddd, dd MMMM yyyy"}, 'D');
DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'y');
DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'Y');
*/
}
public
override
Calendar Calendar
{
get
{
return
cal; }
}
public
override
Calendar[] OptionalCalendars
{
get
{
return
optionals; }
}
how i fix this problem .
thanks.
Hello All, I'm
kind a newbie in the WinForms and what I'm trying to do is the following:
I have a
RadGridView with a GridViewCheckBoxColumn named "chk" and another
GridViewTextBoxColumn named "Serial" and I want to press a button and
print the value of “Serial” of the ones from "chk" are checked.
I attached an
example of a small GridView with only three values, let’s say I check the first
and third, I print “ABCDF” and then print “SerialTest”
Hope anyone can
help me or point me with some ideas
Regards!!
I need to set Column(0) foreground color programmatically. I can't find any examples specifically for this. Would someone please share an example or where I can find how its done?
Thanks!
The original grid was a standard item grid. After the
item number was entered, I did a dgvItems.RefreshEdit() to commit the change
and make the new row accessible.
The telerick datagrid does not have the RefreshEdit()
function and I have not been able to find an equivalent function. When I
access e.RowIndex or dgvItems.CurrentRow.Index, it returns -1. In
addition, if I try to access the new row, I get an index out of range error.
What is the proper method for the row index so that it does not return -1.