I have the following Grid. The problem is I can not add a RequiredFieldValidator for the GridDateTimeColumn in edit mode, as I did for the other columns. I would like to know if it is possible, in the code behind C#, to disable the insert button (the tick sign) when the date is not valid or if I can add a validator for the date, that would not allow to insert an item if the corresponding date is not valid. I have also attached a picture.
Thank you very much for any idea, Alexandru Popa.
<
telerik:RadGrid
ID
=
"rgMealPlanPrices"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"False"
AllowSorting
=
"True"
AllowPaging
=
"True"
PageSize
=
"30"
OnNeedDataSource
=
"rgMealPlanPrices_NeedDataSource"
OnDeleteCommand
=
"rgMealPlanPrices_DeleteCommand"
OnItemDataBound
=
"rgMealPlanPrices_ItemDataBound"
OnInsertCommand
=
"rgMealPlanPrices_InsertCommand"
OnItemCommand
=
"rgMealPlanPrices_ItemCommand"
OnItemCreated
=
"rgMealPlanPrices_ItemCreated"
>
<
MasterTableView
DataKeyNames
=
"Id"
CommandItemDisplay
=
"TopAndBottom"
ShowHeadersWhenNoRecords
=
"True"
TableLayout
=
"Fixed"
EditMode
=
"InPlace"
meta:resourcekey
=
"rgMealPlanPricesResource"
>
<
CommandItemSettings
AddNewRecordText
=
"Adauga"
ShowRefreshButton
=
"False"
ExportToPdfText
=
"Export to PDF"
/>
<
RowIndicatorColumn
Visible
=
"False"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"False"
>
<
HeaderStyle
Width
=
"19px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
HeaderStyle-Width
=
"30px"
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"Id"
HeaderText
=
"Id"
ReadOnly
=
"true"
UniqueName
=
"Id"
ForceExtractValue
=
"Always"
ConvertEmptyStringToNull
=
"true"
Display
=
"False"
/>
<
telerik:GridBoundColumn
DataField
=
"Code"
HeaderText
=
"Cod"
meta:resourcekey
=
"MealPlanCodeResource"
Display
=
"False"
UniqueName
=
"MealPlanCode"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"MealPlan"
HeaderText
=
"Regim de masa"
UniqueName
=
"MealPlanName"
meta:resourcekey
=
"MealPlanResource"
>
<
EditItemTemplate
>
<
telerik:RadComboBox
ID
=
"rcbMealPlan"
runat
=
"server"
AppendDataBoundItems
=
"True"
DataTextField
=
"DisplayName"
DataValueField
=
"Id"
Filter
=
"Contains"
MarkFirstMatch
=
"true"
DropDownWidth
=
"240"
EmptyMessage
=
"Search by name"
meta:resourcekey
=
"rcbMealPlanResource"
Width
=
"240"
>
</
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"rfvMealPlan"
runat
=
"server"
ControlToValidate
=
"rcbMealPlan"
EnableClientScript
=
"true"
SetFocusOnError
=
"true"
meta:resourcekey
=
"rfvMealPlanResource"
>
</
asp:RequiredFieldValidator
>
</
EditItemTemplate
>
<
ItemTemplate
>
<%# Eval("DisplayName") %>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"MealPlanPrice"
HeaderText
=
"Pret"
UniqueName
=
"MealPlanName"
meta:resourcekey
=
"MealPlanPriceResource"
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"txtPrice"
runat
=
"server"
DataType
=
"System.Decimal"
Width
=
"50px"
>
<
NumberFormat
DecimalDigits
=
"2"
DecimalSeparator
=
"."
GroupSeparator
=
""
KeepNotRoundedValue
=
"true"
AllowRounding
=
"false"
/>
</
telerik:RadNumericTextBox
>
<
asp:RequiredFieldValidator
ID
=
"rfvPrice"
runat
=
"server"
ControlToValidate
=
"txtPrice"
EnableClientScript
=
"true"
SetFocusOnError
=
"true"
meta:resourcekey
=
"rfvMealPlanResource"
/>
</
EditItemTemplate
>
<
ItemTemplate
>
<%# Eval("Price") %>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"80px"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"MealPlanCalories"
HeaderText
=
"Calorii"
UniqueName
=
"MealPlanCalories"
meta:resourcekey
=
"MealPlanCaloriesResource"
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"txtCalories"
runat
=
"server"
DataType
=
"System.Decimal"
Width
=
"50px"
>
<
NumberFormat
DecimalDigits
=
"0"
DecimalSeparator
=
"."
GroupSeparator
=
""
KeepNotRoundedValue
=
"true"
AllowRounding
=
"false"
/>
</
telerik:RadNumericTextBox
>
<
asp:RequiredFieldValidator
ID
=
"rfvCalories"
runat
=
"server"
ControlToValidate
=
"txtCalories"
EnableClientScript
=
"true"
SetFocusOnError
=
"true"
meta:resourcekey
=
"rfvMealPlanResource"
/>
</
EditItemTemplate
>
<
ItemTemplate
>
<%# Eval("Calories") %>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"180px"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"MealPlanConfortSporit"
HeaderText
=
"ConfortSporit"
UniqueName
=
"MealPlanConfortSporit"
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"ckbConfortSporit"
runat
=
"server"
></
asp:CheckBox
>
</
EditItemTemplate
>
<
ItemTemplate
>
<%# Eval("ConfortSporit") %>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"180px"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"IssueDate"
HeaderText
=
"Valid de la"
HeaderStyle-Wrap
=
"true"
DataFormatString
=
"{0:dd.MM.yyyy}"
meta:resourcekey
=
"ValidFromResource"
PickerType
=
"DatePicker"
Resizable
=
"true"
>
<
HeaderStyle
Width
=
"80px"
/>
</
telerik:GridDateTimeColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this meal plan?"
ConfirmDialogType
=
"RadWindow"
ConfirmDialogHeight
=
"110px"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
Text
=
"Delete"
CommandName
=
"Delete"
meta:resourcekey
=
"DeleteCommandResource"
ImageUrl
=
"~\Image\icon\16x16_Microsoft_Style\delete_16_OLD.gif"
UniqueName
=
"DeleteServiceColumn"
>
<
HeaderStyle
Width
=
"40px"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Hello,
I'm using AjaxManager in my MasterPage, and AjaxManagerProxy inside my content pages.
I would like to update a label (error or success result) included into my masterpage after clicking any button included inside content pages ajaxified.
But why ajaxify all buttons because each postback done must imperatively refreshing my masterpage label...
I think i can not write dynamically an ajaxsettings with an unknown AjaxifiedControlID, doesn't it ?
Thank you.
function
clearFilters(sender, args) {
var
combo = $find(
"<%= RadComboBox1.ClientID %>"
);
combo.clearItems;
combo.clearSelection;
}
I have nested RadMenuItems hard coded in an aspx file with 3 different but similar menus. Under a certain condition I need to remove the second menu item in each menu which works fine in the Visual Studio 2013 test environment. When I deploy to GoDaddy, remove on the third menu does not work in Page_Load.
GoDaddy the items in the third menu in the aspx file are not fully instantiated in Page_Load.
I was forced to code to check if the hard coded menu items exist and abandon the remove to avoid run-time errors.
if (JoinButtonMenu.Items.Count > 2 && JoinButtonMenu.Items.Count > 2) {
JoinButtonMenu.Items[1].Items[1].Remove();
}
<
telerik:RadContextMenu
ID
=
"JoinButtonMenu"
CssClass
=
"RadContextMenu3"
runat
=
"server"
>
<
ExpandAnimation
Type
=
"None"
Duration
=
"0"
/>
<
CollapseAnimation
Type
=
"None"
Duration
=
"0"
/>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Edit"
NavigateUrl
=
"javascript:MenuItemSelected('Edit');"
PostBack
=
"False"
></
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Insert"
PostBack
=
"False"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Insert Display Text..."
NavigateUrl
=
"javascript:MenuItemSelected('AddText');"
PostBack
=
"False"
></
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Insert Checkboxes..."
NavigateUrl
=
"javascript:MenuItemSelected('AddChecks');"
PostBack
=
"False"
></
telerik:RadMenuItem
>
....
The menu items missing in the Page_Load code all show up fine in the page including the one I need to get rid of.
Any ideas how to work around this problem and why it is happening?
Hello there,
I am using a RadGrid that contains one DetailTable. The MasterTable is set to 100% total width and the DetailTable to 95%. In Details table i have a column of long string (like $0000,0000,000,00). This column stretches out the detail table beyond the Master Table in Mobile or Tablet View (testing using chrome inbulit simulators). If i set the TableLayout property of DetailTable to fixed, then it crops the header and text of some columns. I can set the columns to AutoResize mode but don't want to follow this approach.
Is there any better approach where everything will become responsive in the Mobile and Tablet view? Please help
thanks in advance
Hi guys.
Is me again, now I want to make my gallery fully responsive and adaptative to any device(Desktop, tablet, smartphone), reading the documentation I noticed that RenderMode feature was introduced in Q1 2015, Im working now with Q2 2014.
How can I implement responsive behavior to the gallery in the version tha I´m working?
Thanks.
Cristian.
We would like to display data from ESRI Shapefiles with up to 200,000 points and are wondering if this is possible with the asp.net ajax RadMap.
Right now, we're looking just at performance with a RadClientDataSource loading from a JSON file with 40,000 Points displayed as simple black circles. Panning is fairly fast, but zooming in or out one level takes about 4 seconds, even when none of the points are in view.
I've seen a lot of information on the Silverlight and WPF forums about getting decent performance with ~200,000 points as long as very few are in view at one time, which would be acceptable, but unfortunately we cannot use these platforms.
Does the UI for ASP.NET AJAX have anything like the dynamic layer that would improve performance when a lot of data is out of view? Or are there any other strategies to improve performance when this much data needs to be loaded?
Thanks in advance,
-Andrew
Hi,
First i'm sorry for my bad english, I'm not really good. But I will try to explain my problem for you can understand.
In the project, we have a RadComboBox who get data by a ItemRequest. This comboBox serve for select a Person who are view in DataList
<
telerik:RadComboBox
ID
=
"radPersonCombo"
runat
=
"server"
Width
=
"400"
DropDownWidth
=
"700"
Height
=
"300"
AccessibilityMode
=
"true"
AutoPostBack
=
"false"
EnableScreenBoundaryDetection
=
"true"
EnableVirtualScrolling
=
"true"
ItemsPerRequest
=
"10"
ShowMoreResultsBox
=
"true"
EnableLoadOnDemand
=
"true"
OnItemsRequested
=
"radPersonCombo_ItemsRequested"
CheckBoxes
=
"true"
CheckedItemsTexts
=
"FitInInput"
>
<
HeaderTemplate
>
<
table
style
=
"width: 682px"
cellspacing
=
"0"
>
<
tr
>
<
th
style
=
"width: 32px"
></
th
>
<
th
style
=
"width: 125px"
><
asp:label
ID
=
"radTitleLN"
runat
=
"server"
><%= LocalizationTools.RM.GetString("lblName") %></
asp:label
></
th
>
{...}
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
style
=
"width: 682px"
cellspacing
=
"0"
>
<
tr
>
<
td
style
=
"width: 32px"
></
td
>
<
td
style
=
"width: 125px"
><%# DataBinder.Eval(Container, "Attributes['LastName']")%></
td
>
{...}
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
<asp:datalist id="dtlPerson" runat="server"> {...} </asp:datalist>
That comboBox can have more 1000 DataItem. For this reason we use EnableLoadOnDemand, but the EnabledLoadOnDemand don't preserve item server-side.
When I check the elements and I close the ComboBox. If AutoPostBack option is True.
I get the error:
Index was out of range. It must not be negative and must be less than the size of the collection.
Parameter name: index
I tried using the following example. However, this example remains the client side. And when I try to spent AjaxRequest to call the Fill methods that data DataList. Nothing displays.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultvb.aspx
Otherwise these is possible to align the check box in the center of the element? Since it is not included in my Template. (See Image CheckBoxMiddleAlign)
The desired final result should be like the image finalResult attached.