or
In the design time, I set the CssClass property to "red"
After some event, I try to set it to "yellow", but it doesn't work.
I tried:
TxtAmount.CssClass = "yellow";
Also
TxtAmount.CssClass += TxtAmount.CssClass.Replace("red", "yellow");
plus other ways
<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeBehind="TestRadFormDecorator1.aspx.vb"
Inherits="WebwareNET.TestRadFormDecorator1" ClientIDMode="Static" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
script
type
=
"text/javascript"
src
=
"http://code.jquery.com/jquery-1.10.2.min.js"
></
script
>
<
script
type
=
"text/javascript"
>
function wsListMoveItem(p_sSourceID, p_sTargetID) {
$('#' + p_sSourceID + ' > option:selected').each(function () {
$(this).remove().appendTo('#' + p_sTargetID);
});
}
</
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
ShowChooser
=
"true"
runat
=
"server"
/>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
DecoratedControls
=
"all"
runat
=
"server"
/>
<
table
>
<
tr
style
=
"vertical-align: middle;"
>
<
td
style
=
"text-align: center;"
>
Does NOT belong
<
br
/>
<
asp:ListBox
ID
=
"lstDoesNot"
Rows
=
"7"
SelectionMode
=
"Multiple"
runat
=
"server"
>
<
asp:ListItem
Text
=
"1"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"2"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"3"
></
asp:ListItem
>
</
asp:ListBox
>
</
td
>
<
td
style
=
"text-align: center;"
>
<
asp:Button
ID
=
"btnAdd"
runat
=
"server"
Text
=
"»"
UseSubmitBehavior
=
"false"
OnClientClick
=
"wsListMoveItem('lstDoesNot','lstDoes');return false;"
/>
<
br
/>
<
br
/>
<
asp:Button
ID
=
"btnRemove"
runat
=
"server"
Text
=
"«"
UseSubmitBehavior
=
"false"
OnClientClick
=
"wsListMoveItem('lstDoes','lstDoesNot');return false;"
/>
</
td
>
<
td
style
=
"text-align: center;"
>
Does belong
<
br
/>
<
asp:ListBox
ID
=
"lstDoes"
Rows
=
"7"
SelectionMode
=
"Multiple"
runat
=
"server"
>
<
asp:ListItem
Text
=
"a"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"b"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"c"
></
asp:ListItem
>
</
asp:ListBox
>
</
td
>
</
tr
>
</
table
>
</
form
>
</
body
>
</
html
>
RadGrid1.MasterTableView.IsItemInserted = true |
RadGrid1.Rebind() But unfortunately this just displays the "in-place" edit form rather than simulating "Add New Record" when the grid is in batch editing mode. Also is it possible to have a custom "Save Changes" and "Cancel Changes" button outside of the grid control elsewhere on the form? This is because I want to allow the users to edit other controls on the form but I want one "Save Changes" button to update everything. My custom Save Changes button will save outher edits on the form and also the grid edits. |
Hi,
I have a RadGrid with a selectedindexchanged event. When I click on a row, the event fires, and I can do what I want. However, after selecting a row, if I click a button on the form (nothing to do with the grid), the selectedindexchanged event fires again, and I don't get the button press.
Any ideas how to stop this please?
Thanks
<telerik:RadToolBar ID=
"GridToolBar"
OnClientButtonClicking=
"clickHandler"
dir=
"<%$ Resources: Main,Dir %>"
OnButtonClick=
"GridToolBar_OnClick"
runat=
"server"
Width=
"100%"
>
<Items>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,ExportToExcel %>"
runat=
"server"
Value=
"Excel"
ImageUrl=
"<%$ Resources:Image, Excel%>"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,ExportToExcelML %>"
runat=
"server"
Value=
"ExcelML"
ImageUrl=
"<%$ Resources:Image, ExcelML%>"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,ExportToWord %>"
runat=
"server"
Value=
"Word"
ImageUrl=
"<%$ Resources:Image, Word%>"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,ExportToCSV %>"
runat=
"server"
Value=
"CSV"
ImageUrl=
"<%$ Resources:Image, CSV%>"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,ExportToPDF %>"
runat=
"server"
Value=
"PDF"
ImageUrl=
"<%$ Resources:Image, PDF%>"
>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton ToolTip=
"<%$ Resources: Main,AddExistingUser %>"
CssClass=
"<%$ Resources: Main,ToolbarButtonAlignment %>"
runat=
"server"
Value=
"AddUser"
ImageUrl=
"<%$ Resources:Image, RegisterUser%>"
>
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
function
clickHandler(sender, eventArgs) {
if
(eventArgs.get_item().get_value() ==
"AddUser"
) {
alert("Welcome");
radopen(
"Page_Popup.aspx"
,
"RW"
);
return
false
;
}
}
<
telerik:RadWindowManager
ID
=
"RWM"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RW"
runat
=
"server"
Width
=
"600px"
Height
=
"330px"
Behaviors
=
"Close, Move, Minimize, Pin, Reload"
ShowContentDuringLoad
=
"false"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>