http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grid-selected-row-at-all-times.html
@media screen and (-webkit-min-device-pixel-ratio: 0) {
.RadForm_CRM {
/* checkboxes */
}
.RadForm_CRM.rfdCheckbox input[type="checkbox"], .RadForm_CRM.rfdCheckbox input[type="checkbox"][disabled]:hover, .RadForm_CRM.rfdRadio input[type="radio"], .RadForm_CRM.rfdRadio input[type="radio"][disabled="disabled"]:hover {
/*height: 30px;
line-height: 30px !important;
padding-left: 22px !important;*/
/*background-image: url('../Common/MetroTouch/CheckBoxRadioSprites.png');
background-repeat: no-repeat;*/
background-position:0 0 !important;
}
.RadForm_CRM.rfdCheckbox label, .RadForm_CRM.rfdRadio label {
vertical-align: middle;
}
.RadForm_CRM.rfdCheckbox input[type="checkbox"], .RadForm_CRM.rfdCheckbox input[type="checkbox"][disabled]:hover {
background-image: url('../Common/MetroTouch/CheckBox.png') !important;
background-position:0 0 !important;
background-repeat: no-repeat !important;
height:24px !important;
width:24px !important;
}
.RadForm_CRM.rfdCheckbox input[type="checkbox"]:hover {
background-image: url('../Common/MetroTouch/CheckBoxHover.png') !important;
background-position:0 0 !important;
background-repeat: no-repeat !important;
height:24px !important;
width:24px !important;
}
.RadForm_CRM.rfdCheckbox input[type="checkbox"]:checked, .RadForm_CRM.rfdCheckbox input[type="checkbox"][disabled]:hover:checked {
background-image: url('../Common/MetroTouch/CheckBoxChecked.png') !important;
background-position:0 0 !important;
background-repeat: no-repeat !important;
height:24px !important;
width:24px !important;
}
.RadForm_CRM.rfdCheckbox input[type="checkbox"]:hover:checked {
background-image: url('../Common/MetroTouch/CheckBoxCheckedHover.png') !important;
background-position:0 0 !important;
background-repeat: no-repeat !important;
height:24px !important;
width:24px !important;
}
Any ideas?
THX.
Uros
Hi,
My grid has template column with textbox in item template and textbox in footer template. The aspx looks like this:
<telerik:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter Amount column" Groupable="False" HeaderText="Amount" Reorderable="False" ShowFilterIcon="False" UniqueName="Amount" HeaderTooltip="Amount">
<HeaderStyle Width="17%"></HeaderStyle>
<ItemTemplate>
<asp:TextBox ID="txtAmount" runat="server" Width="75%" CssClass="rightalign" onblur="return txtAccountAmount_Blur
(event);" />
</ItemTemplate>
<FooterTemplate>
<asp:Literal ID="Literal1" runat="server" ><span style='color: Black; font-weight:
bold;'>Sum:</span></asp:Literal>
<asp:TextBox ID="txtAmountTotal" runat="server" Width="75%" CssClass="rightalign" />
</FooterTemplate>
</telerik:GridTemplateColumn>
Then I have function on this local aspx page as:
function txtAccountAmount_Blur(evnt){
var txtBox = ((evnt.target) ? evnt.target : evnt.srcElement);
var isValid = Currency_Validate( txtBox );
SetGridCurrencyTextBoxError(isValid, txtBox, evnt);
return isValid;
}
In global javascript:
function SetGridCurrencyTextBoxError(isValid, txtBox, evt){
var cell = txtBox.parentNode;
var errorMsg = document.getElementById(cell.id + "_spnError");
if(!isValid){//Was not valid currency value.
if(!errorMsg){
errorMsg = document.createElement('span');
errorMsg.className = 'inlineerrortext';
errorMsg.innerHTML = 'Invalid currency value.';
errorMsg.id = cell.id + "_spnError";
cell.insertBefore(errorMsg, txtBox);
}
}
Cell.id is always empty. I used developer tools to debug. There is textbox id. I see it. It is something like this:
Ctl00_maincontent_rgdAccounts_ctl00_ctl04_txtAmount . As far as I know, parent id should be - Ctl00_maincontent_rgdAccounts_ctl00_ctl04
Please let me know how to get id of parentnode
Thanks,
Prathiba
<telerik:RadChart ID="radchart1" runat="server" OnBeforeLayout="radchart1_OnBeforeLayout"
AutoLayout="true" Skin="Vista" IntelligentLabelsEnabled="false" PlotArea-XAxis-AutoScale="false" ><PlotArea>
<XAxis>
<Appearance><TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" />
<LabelAppearance RotationAngle="60"> </LabelAppearance>
</Appearance>
chartseries.Type = ChartSeriesType.Line;
chartseries.Appearance.PointMark.Visible = true;
chartseries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
chartseries.Appearance.LabelAppearance.Visible = false;
for (int i = 0; i < data.Count(); i++){
if (radchart1.PlotArea.XAxis.Items.Count() < data.Count()) radchart1.PlotArea.XAxis.AddItem(data[i].Date.ToString());
chartseries.AddItem(Convert.ToDouble(data[i].Count) > 100 ? 101 : Convert.ToDouble(data[i].Count), data[i].Count.ToString());
chartseries.Items.Last().ActiveRegion.Tooltip = data[i].Count.ToString("#,##0");
}
function to customize xaxis labels
protected void radchart1_OnBeforeLayout(object sender, EventArgs e)
{
foreach (var item in radchart1.PlotArea.XAxis.Items)
{
DateTime xaxis = Convert.ToDateTime(item.TextBlock.Text);{
item.Visible = false;
}
else{
item.TextBlock.Text = xaxis.ToString("h tt");
item.Visible = true;
}
}
}
<telerik:RadWindow ID="rwLumpSum" Modal="true" Top="0" Left="0" VisibleOnPageLoad="false" runat="server" > <ContentTemplate> <asp:UpdatePanel ID="cpLumpSum" UpdateMode="Conditional" runat="server"> <ContentTemplate> <table> <tr> <td>Lump Sum</td> <td> <telerik:RadNumericTextBox ID="rntbLumpSum" MinValue="1" MaxValue="999.99" runat="server"> <NumberFormat DecimalDigits="2" /> </telerik:RadNumericTextBox> </td> </tr> <tr> <td> <telerik:RadButton id="rbCancel" Text="Cancel" OnClientClicked="rbCancelClicked" AutoPostBack="false" UseSubmitBehavior="false" runat="server" /> </td> <td> <telerik:RadButton id="rbUpdate" Text="Update" runat="server" /> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate></telerik:RadWindow>function rbCancelClicked(button) { var rwLumpSum = $find("<%=rwLumpSum.ClientID%>"); rwLumpSum.Close();}Protected Sub rbUpdate_Click(sender As Object, e As EventArgs) Handles rbUpdate.Click Dim ws As CommonFunctions Dim sb As StringBuilder = Nothing sb = New StringBuilder("<SCRIPT language='javascript'>") sb.Append("var rwLumpSum = $find(") sb.Append(Chr(34)) sb.Append("<%=rwLumpSum.ClientID%>") sb.Append(Chr(34)) sb.Append(");rwLumpSum.Close();") sb.Append("</SCRIPT>") ws = New CommonFunctions() ScriptManager.RegisterStartupScript(Me, Me.GetType(), "CloseWindow", sb.ToString, False)End Sub