<
telerik:RadButton
ID
=
"btnShowImage"
runat
=
"server"
Text
=
"Show Image"
OnClick
=
"btnShowImage_Click"
CommandName
=
"btnShowImage"
onclientclicked
=
"CheckItem"
>
</
telerik:RadButton
>
function
CheckItem(sender, e) {
if
(sender._commandName ==
"btnShowImage"
) {
RadConfirm(
"¿are sure?"
, btnShowImageResume, 330, 100,
null
,
"Confirm."
);
sender.set_autoPostBack(
false
);
}
else
{
sender.set_autoPostBack(
true
);
}
}
function
btnShowImageResume(arg) {
if
(arg) {
__doPostBack(
"btnShowImage"
,
"onclick"
);
}
}
RadConfirm(confirm message
, javascript function that be executed after user take a decision, width, height,
objet reference
,
message tittle
);"
After, javascript cancel objet postback (preventing that compiler continues with onclick event code.) else continues with postback.
When user takes a decision RadConfirm call resume function in this example:'btnShowImageResume' function, this function validate if arg parameter (result) is true then executes onclick event of the control else does not do nothing (you can execute another event if you want). when we call to _dopostback javascript function, RadAjaxManager evalues situation and execute its.
I hope they will be of great help.
var combo = $find("<%=this.MySpiffyCombo.ClientID %>"); |
combo.requestItems(); |
var ajaxManager= $find("<%=this.RadAjaxManager1.ClientID %>"); |
ajaxManager.ajaxRequest("foo"); |
var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID %>"); |
ajaxManager.ajaxRequestWithTarget("<%=this.MySpiffyCombo.UniqueID %", ""); |
I have a radhtmlchart using BarSeries with one data series. The data is sourced from a linq query, not generated directly in codebehind like the demo for colorizing bars shows. What I would like to do is colorize the bars depending on a second value in the results of the query.
The top of the chart code is straightforward. I'm leaving out non-relevant code but let me know if there's something else you need to see.
<telerik:RadHtmlChart ID="BarChart1" runat="server">
<PlotArea>
<Series>
<telerik:BarSeries DataFieldY="DailyGrossQty" Name="Daily Gross Qty" Visible="true" Stacked="false" gap=".4" spacing="0.4">
<Appearance>
<FillStyle BackgroundColor="#145e8e"></FillStyle>
</Appearance>
</telerik:BarSeries>
The linq query is also straightforward:
var x = from Z in db.spDailyData(ReportDate)
select Z;
BarChart1.DataSource = x.OrderByDescending(o => o.DailyGrossQty).Take(25);
There is another field in the stored procedure called 'Division' and I would like to conditionally color the bars based on the value there, overriding the default.
What would be the simplest approach to that?
Thanks.
-Dan
<telerik:RadComboBox ID="rcProject" Runat="server" AllowCustomText="false"
AutoPostBack="True" EmptyMessage="Type a Project Name"
EnableLoadOnDemand="True" EnableVirtualScrolling="True" Filter="StartsWith"
Height="22px" MaxHeight="200px" OnItemsRequested="rcProject_ItemsRequested"
ShowMoreResultsBox="true"
ToolTip="You can type or scroll and select. What you type, must exist in the list"
Width="200px">
</telerik:RadComboBox>
In the Radscheduler I have the grid divided every 30 minutes. but if for example I have a 2-hour appointment, it fills the slot with a single appointment. How do I leave the 30-minute split even when entering long appointments?
How can I set the border style of the row on HoverRow?
I can set the back color no problem.
But, any change to the border does not seem to have any effect.
In<ClientSettings> of grid I set EnableRowHoverStyle="true"
Then is style section I have css:
<style type="text/css">
div.RadGrid .rgHoveredRow
{
background-color:#ff0000 !important; /* this works */
border-width:thick !important; /* no effect */
border-right-color:black !important;/* no effect */
}
</style>
I have a user control with a RadGrid in my applicaiton.
The RadGrid fills properly by binding a datatable to the grid. It shows properly on the screen with data.
Once I try to Sort or group, I am getting this error:
Any suggestions would be appreciated. I am on Version 2019.2.514.40 of Telerik asp.net controls.
Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidCastException: Unable to cast object of type 'ASP.masterpages_main_master' to type 'Telerik.Web.UI.GridTableView'.]
Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +3585
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9884270
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
Thanks,
Rog
<telerik:RadGrid ID="radGridSelectUser" runat="server" Skin="Office2007"
AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true"
AllowMultiRowSelection="true" Width="99%" >
<GroupingSettings CaseSensitive="false" />
<ExportSettings OpenInNewWindow="true">
<Pdf FontType="Link" PaperSize="A4" />
<Excel Format="Html" />
<Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />
</ExportSettings>
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView >
<PagerTemplate>
<!-- This is my custom footer-->
<uc1:gridFooter ID="gridFooter" runat="server" />
</PagerTemplate>
<Columns>
<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" DataField="Username" SortExpression="Username" FilterControlWidth="95%" >
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkUserName" OnClick="lnkUserName_Click" ToolTip='<%# DataBinder.Eval(Container.DataItem,"Username")%>' CommandName="SELECT" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"UserId")%>' Text='<%# DataBinder.Eval(Container.DataItem,"Username")%>'></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
radGridSelectUser.ExportSettings.ExportOnlyData =
true;
radGridSelectUser.ExportSettings.IgnorePaging =
true;
radGridSelectUser.ExportSettings.OpenInNewWindow =
true;
radGridSelectUser.MasterTableView.ExportToCSV();
Best Regards
Rizwan Bashir
Hi,
I am getting a WebResource.axd 404 with the query string "P1cfbt_tMqMFRD7W.....asPNRfcrST-9miVNk1". When decrypted it says "pTelerik.Web.UI.Skins|Telerik.Web.UI.Skins.Windows7.Grid.sprite.png". All my other skins and sprites are loading properly. I have been through the telerik documentation discussing skins and WebResource.axd issues to no avail.
Any help would be appreciated.
Thanks,
Mike