Hi everybody, I hope someone of you can give a hand. I will post some sample code however they are pretty much what I am trying to do.
I have a button which executes both client side (OnClientClicking) and server side (OnClick) events. The point is that from the client side I execute a PageMethod in order to get the result of a calculation. Up to this point everything is OK but here comes the tricky part.
I need to check for the result in order to determine if it is greater than some value. If this condition is true then I ask the user to confirm if he wishes to continue, so if the user says YES then the code continues executing OnClick event but if user says NO then OnClick must not be executed.
I have tried passing teleriks args as a parameter but it is not working (OnSuccess function receives it as null). I do this in order to call args.set_cancel() method.
Here is the code at client side
01.
function
btnCallback_Clicking(sender,args)
02.
{
03.
var
num = parseInt( prompt(
"Enter an integer number"
,
"1"
) );
04.
05.
PageMethods.multiply(num,
function
(response, args){ TheSuccess(response, args); });
06.
}
07.
08.
function
TheSuccess(response, args)
09.
{
10.
//alert(' TheSuccess: \nResult obtained was: ' + response);
11.
if
(response > 70) {
12.
var
cancel = !confirm(
"Result obtained was greater than 70 ¿Continue?"
);
13.
args.set_cancel(cancel);
14.
}
15.
}
Here is the code at server side
01.
[System.Web.Services.WebMethod]
02.
public
static
int
multiply(
int
num)
03.
{
04.
int
res = num * num;
05.
return
res;
06.
}
07.
08.
protected
void
btnCallback_Click(
object
sender, EventArgs e)
09.
{
10.
string
extra =
"User agreed to do this"
;
11.
btnCallback.Text = extra;
12.
}
Any ideas about how to achieve this.
Thanks in advance.
Hi, I have implemented a custom FileBrowserContentProvider for Azure and customized the file bowser by following the steps on the “Editor - Customize Built-in Dialogs” article (http://demos.telerik.com/aspnet-ajax/editor/examples/externaldialogspath/defaultcs.aspx).
Everything is working well but the image editor is not rendered properly (check the attached files).
<telerik:RadEditor
ID="RadEditor1"
RenderMode="Classic"
LocalizationPath="~/App_GlobalResources/Controls_Editor"
ContentFilters="MakeUrlsAbsolute"
DocumentManager-MaxUploadFileSize="11000000"
OnFileUpload="RadEditor1_FileUpload"
OnFileDelete="RadEditor1_FileDelete"
ExternalDialogsPath="~/Controls/TelerikEditorDialogs/"
runat="server">
<Tools>
<telerik:EditorToolGroup Tag="FileManagers">
<telerik:EditorTool Name="ImageManager"></telerik:EditorTool>
<telerik:EditorTool Name="DocumentManager"></telerik:EditorTool>
<telerik:EditorTool Name="TemplateManager"></telerik:EditorTool>
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold"></telerik:EditorTool>
<telerik:EditorTool Name="Italic"></telerik:EditorTool>
<telerik:EditorTool Name="Underline"></telerik:EditorTool>
<telerik:EditorSeparator></telerik:EditorSeparator>
<telerik:EditorTool Name="ForeColor"></telerik:EditorTool>
<telerik:EditorTool Name="BackColor"></telerik:EditorTool>
<telerik:EditorSeparator></telerik:EditorSeparator>
<telerik:EditorTool Name="FontName"></telerik:EditorTool>
<telerik:EditorTool Name="RealFontSize"></telerik:EditorTool>
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
Hi,
When i try to resize the columns using resize to fit option for more than 30 columns ,UI get freezes for few seconds.Please let me know if any body has any solution on this.
<telerik:RadListBox runat="server" ID="rlbOrderList" Width="495px" Height="320px" |
AllowDelete="False" AllowReorder="False" Skin="Default" CssClass="cert" AutoPostBack="True" |
OnSelectedIndexChanged="rlbOrderList_SelectedIndexChanged"> |
</telerik:RadListBox> |
foreach (eSolutions.HomeHealth.Core.ReadOnly.Order ord in ol) |
{ |
rlbOrderList.Items.Add(new RadListBoxItem("<span class='" + ord.OrdersDisciplineCode + "'> </span><b>" + ord.OrdersDisciplineCode + ":</b> " + ord.OrderDescription.Trim(), rd.OrderID)); |
} |
I'm trying to load treelist, everything works well but i always see "No Records To Display".
Here is the control:
<telerik:RadTreeList ID="trlProductGroups" runat="server" AllowPaging="true" PageSize="5"
DataKeyNames="ID" ParentDataKeyNames="PARENT_ID" AutoGenerateColumns="false"
OnInsertCommand="trlProductGroups_InsertCommand" OnNeedDataSource="trlProductGroups_NeedDataSource"
OnUpdateCommand="trlProductGroups_UpdateCommand" OnDeleteCommand="trlProductGroups_DeleteCommand">
<Columns>
<telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ButtonType="ImageButton"
HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
<telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
<ItemStyle CssClass="MyImageButton" />
</telerik:TreeListEditCommandColumn>
<telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete"
ButtonType="ImageButton" />
<telerik:TreeListBoundColumn DataField="ID" UniqueName="ID" HeaderText="Grup ID"
ReadOnly="true" />
<%-- <telerik:TreeListTemplateColumn DataField="GROUP_NAME" UniqueName="GROUP_NAME" HeaderText="Grup Adı">
<EditItemTemplate>
<asp:TextBox ID="txtGroupName" runat="server"></asp:TextBox>
</EditItemTemplate>
</telerik:TreeListTemplateColumn>--%>
<telerik:TreeListBoundColumn DataField="GROUP_NAME" UniqueName="GROUP_NAME" HeaderText="Grup Adı" />
<telerik:TreeListBoundColumn DataField="PARENT_ID" UniqueName="PARENT_ID" HeaderText="Ana Grup ID"
ReadOnly="true" />
</Columns>
</telerik:RadTreeList>
And here is the NeedDataSource Code:protected void trlProductGroups_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e)
{
WebAppTest.Objects.ProductGroups pGroups = new WebAppTest.Objects.ProductGroups();
DataTable dt = pGroups.SelectData(null, string.Empty);
trlProductGroups.DataSource = dt;
}I can see the data in DataTable, but treelist wont load data. Is there any mistake i make?
Thanks
Hello everyone,
Can anybody tell mi how to bind selected rows from temporary datatable to rad grid.
Thank You
I believe I found a limitation in the batch editing feature which doesn't appear to be documented anywhere. I have been able to replicate this using your online batch editing demo at http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx
The limitation has to do with making changes to text fields that include html markup. For example, in your demo, if I click to batch edit the ProductName column and enter something like '<b>My Product Name</b>', the text is saved properly upon saving the batch edit, and the product name is displayed in bold in the grid. However, if I then go to edit this field again, the full html text is not shown in the editor... only 'My Product Name'. Saving this obviously strips the <b> tags.
It seems the editor is not able to render these tags. I wouldn't expect a simple text field editor to display rich text, but I would expect it to display the actual text as saved in the datasource (in this case '<b>My Product Name</b>'). I'm not sure why the editor strips the '<b>' and '</b>' tags. I tried using the encoded values for these tags (like < and >) and the same thing happens. This basically means that one cannot use batch editing when storing html values.
You may want to emphasize this limitation somewhere so people don't waste there time trying to implement batch-editing solutions for html content. Also, is there a particular reason for this limitation? I can see how stripping script tags would make sense from a security standpoint, but I'm not really sure about other valid html. Is this something that won't be a limitation in the future?