Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
118 views
Hi,

what ist the best practice to bind the CheckboxColumn to a non boolean column / property (we have a legacy database that uses smallint instead - like null or 0 for false and 1 for true)? I tried it with a partial class with wrapper properties on entity Level, but then ran into errors when inserting / updateing / editing within RadGrid


Exception = {"A property named 'BSPERRUNG' was not found on the entity during an insert, update, or delete operation. Check to ensure that properties specified as binding expressions are available to the data source."}

BSPERRUNG is the wrapper property for SPERRUNG, that is the original smallint column.

Are there any possibilities to achieve this with built in RadGridView features?

Greets Jochen
Marin
Telerik team
 answered on 13 Oct 2014
2 answers
95 views
HI,

I try to get the 'Standalone Tiles' example from your demo Website ( http://demos.telerik.com/aspnet-ajax/tilelist/examples/standalonetiles/defaultcs.aspx )
to run on my System.

In the mentioned example you have the following JavaScript code:

function liveTileOnClientTemplateDataBound(sender, args) {            var index = args.get_dataItem().index + 1;            if (index > 2) {                index = 0;            }            sender.set_value(index.toString());        }

Inside the code you use a function with Name set_value().
I assume what this function should do is to set the 'Value' property of the live tile.
Unfortunately there is no place in the online doc to a 'set_value()' function, at least I did not find it. Also no mentioning in the Forum.

What I THOUGHT I can do with this function is to set the value of the 'context' object Parameter to Server side pagemethod specified in the WebServiceSettings tag of the live tile.

But to what ever I set the value in set_value() it has no influence to the context object in the pagemethod.

Since set_value is not documented- Is this function really doing something or is the code in the demo wrong ?

I really WOULD like to set the value of the context object of the pagemethod.
How can I do this (if set_value is NOT the way to do it) ????

Hope that someone knows an answer.
Best regards
Hans-Juergen















 
Marin Bratanov
Telerik team
 answered on 13 Oct 2014
4 answers
855 views
Hello Team,
                    I am facing an issue with RadAsyncUpload when i upload a file we used to get green mark as symbol of successfully inserted int database,but now we are facing an issue, as we upload a file we getting a red symbol mark after we upload,but uploaded file is not saved and also getting red mark.Help me out from this issues ?? 
Hristo Valyavicharski
Telerik team
 answered on 13 Oct 2014
2 answers
154 views
I need to create a rotator that dynamically adds and removes items, because the items will be changing in real time. I was trying to get the web service to work, and it does work the first time, but it never gets called a second time. Here is my code:

[code language="csharp"]
[System.Web.Script.Services.ScriptService]
public class OverstockService : System.Web.Services.WebService 
{
    [WebMethod]
public RadRotatorItemData[] RSGetImages(int itemIndex, string argument)
{
List<RadRotatorItemData> result = new List<RadRotatorItemData>();
RadRotatorItemData item; 
for (int i = 0; i < 3; i++)
{
item = new RadRotatorItemData();
item.Html = "test "+(itemIndex+i) + "arg=" + argument;
result.Add(item);
}
return result.ToArray();
}
}
[/code]

[code language="html"]
<script type="text/javascript">
var index = 0;
function OnClientItemsRequesting(sender, args) {
var dbg = document.getElementById("debug");
dbg.innerHTML += "Request<br/>";
args.set_argument(index.toString());
index++;
}

</script>
<span id="debug"></span>
<telerik:RadRotator ID="rrGallery" runat="server" Width="250px" Height="250px" ScrollDuration="500" 
ItemHeight="200" ItemWidth="200" OnClientItemsRequesting="OnClientItemsRequesting" RotatorType="AutomaticAdvance">
<WebServiceSettings Path="/WebServices/OverstockService.asmx" Method="RSGetImages" />
</telerik:RadRotator>

[/code]

My plan was to remove items from the list once it got to a certain size, but the web service only gets called once. Can anyone help please?


Shawn
Top achievements
Rank 1
 answered on 13 Oct 2014
6 answers
758 views
Hi All

I want to open a pdf file wiithin a Rad Window, Is that possible? I am currently opening the pdf file from the database and that is always opeing in new window.

If any one can help please!

thanks
Rick
Marin Bratanov
Telerik team
 answered on 13 Oct 2014
2 answers
58 views
Hi support team,

Telerik TreeView is awesome, all my requirements are met. Great job!
But here I am stuck:

- I have a tree and the user can select multiple nodes.
- Initially, some nodes are expanded, so that all selected nodes are displayed. I do this with a datasource and with the OnNodeDataBound. 
- All nodes can be expanded with TreeNodeExpandMode.WebService

All works fine but when I collapse a initially loaded node, and then expand it again, the number of child nodes doubles, each child node is contained twice. When I do this again, it is still contained twice (not tree times).

How does the control do the "identity". Is is not the RadTreeNode.Value? 
One workaround is the set the ExpandMode of RadTreeNode to Server to all nodes that are initially expanded. But then the user can not collapse it (nothing happens when the user clicks -).  Best regards, a good customer 








Claude
Top achievements
Rank 1
 answered on 13 Oct 2014
1 answer
478 views
I have looked at the following forum post: http://www.telerik.com/forums/strange-behavior-when-using-args-set-cancel-true and although my code is similar still having odd behavior. 

When clicking on the radButton it will fire the validation but it takes clicking on the "OK" button twice before the validation summary disappears.

Suggestions?

<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
        function ShowConfirm(clickedButton, args) {
            var validated = Page_ClientValidate('Form');
            if (validated) {
                args.set_cancel(true);
                function callBackFunction(arg) {
                    if (arg == true) {
                        clickedButton.click();
                    }
                }
                //Open the window
                $find("<%=confirmWindow.ClientID %>").show();
                //Focus the Yes button
                $find("<%=btnYes.ClientID %>").focus();
                //Cancel the postback
                args.set_cancel(true);
            }
        }
 
        function YesOrNoClicked(sender, args) {
            var oWnd = $find("<%=confirmWindow.ClientID %>");
            oWnd.close();
            if (sender.get_text() == "Yes") {
                $find("<%=_btnFinish.ClientID %>").click();
            }
        }
    </script>
</telerik:RadCodeBlock>

    <asp:Panel runat="server" ID="ShowHistorical" Visible="false">
    <tr>
        <td style="text-align: center;" align="center">There is no <strong>Historical data for <asp:Label ID="_Step2CUName" runat="server"></asp:Label>.</strong>  Please select this credit unions Member Type before proceeding.<br />
            <br />
            <telerik:RadDropDownList ID="_ddMember" runat="server" AutoPostBack="true" DefaultMessage="Select Member Type"></telerik:RadDropDownList>  
            <asp:RequiredFieldValidator ID="_reqValMemberType" runat="server" ControlToValidate="_ddMember" Text="*" ForeColor="Red"
                ErrorMessage="You must select a Member Type before you can submit this Credit Union to be reinstated!<br />"
                ValidationGroup="Form" Display="Dynamic" EnableClientScript="true"></asp:RequiredFieldValidator>
        </td>
    </tr>
    </asp:Panel>
    <tr>
        <td align="center">
            <telerik:RadButton ID="_btnFinish" runat="server" Text="Finish" CommandName="Continue" ValidationGroup="Form"  Visible="false"
                OnClientClicking="ShowConfirm"></telerik:RadButton>
            <asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="Form" ShowMessageBox="true" ShowSummary="false"  DisplayMode="BulletList" />
        </td>
    </tr>
</table>

<telerik:RadWindowManager ID="windowManager1" runat="server">
</telerik:RadWindowManager>
<telerik:RadWindow ID="confirmWindow" runat="server" VisibleTitlebar="false" VisibleStatusbar="false"
    Modal="true" Behaviors="None" Height="200px" Width="350px">
    <ContentTemplate>
        <div style="margin-top: 30px; float: left;">
                <div style="width: 60px; padding-left: 15px; float: left;">
                    <img src="/images/ModalDialogAlert.gif" alt="Confirm Page" />
                </div>
                <div style="width: 230px; float: left;">
                    <asp:Label ID="lblConfirm" Font-Size="14px" Text=""
                        runat="server"></asp:Label>
                    <br />
                    <br />
                    <telerik:RadButton ID="btnYes" runat="server" Text="Yes" AutoPostBack="false" OnClientClicked="YesOrNoClicked">
                        <Icon PrimaryIconCssClass="rbOk"></Icon>
                    </telerik:RadButton>
                    <telerik:RadButton ID="btnNo" runat="server" Text="No" AutoPostBack="false" OnClientClicked="YesOrNoClicked">
                        <Icon PrimaryIconCssClass="rbCancel"></Icon>
                    </telerik:RadButton>
                </div>
        </div>
    </ContentTemplate>
</telerik:RadWindow>







Danail Vasilev
Telerik team
 answered on 13 Oct 2014
2 answers
96 views
We have the Filemanager on a screen and depending on the role the user is they will not be able to delete files.  I remove Delete from the toolbar and I also removed from the ContextMenu, but for some reason if the user clicks on file and hits the delete key they can still delete the file.

I tried to add  
    if (e.Command == "DeleteFile")
            e.Cancel = false;

to the OnItemCommand.  When I hit the delete key it will run through this logic but it still deletes the file.

Vessy
Telerik team
 answered on 13 Oct 2014
7 answers
320 views
Hi expert,

I have this exception when excuting this code:

 

If AsyncUpload1.UploadedFiles.Count > 0 Then

AsyncUpload1.UploadedFiles(0).SaveAs(Server.MapPath(

 

"/documents") & fileName, True)

 

End If


then exception occurs:

Could not find file 'xxx\App_Data\RadUploadTemp\mq1ukeso.2dm'.

During debugging, I noticed that temp file 'mq1ukeso.2dm' is existed just before excuting 'SaveAs' method, and it disappear when excuting 'SaveAs...' method, is there any obvious mistake I made? many thanks for your help! 



my aspx page:

<telerik:RadAsyncUpload ID="AsyncUpload1" runat="server"
                                                                        OnClientFileUploaded="OnClientFileUploaded"
                                                                        MaxFileSize="2097152" MaxFileInputsCount="1"
                                                                        AutoAddFileInputs="false" />
Bálint
Top achievements
Rank 1
 answered on 13 Oct 2014
1 answer
123 views
Greetings, I have an .ASP form with a telerik dataGrid (Rgd1) with a nested RadGrid (Rgd2) in a RadMultiPage RadPageView... My second RadGrid (Rgd2) use EditFormType = Template in which I have a control to open a Modal Form to udate some information, I need to rebind the Second RadgGrid, and if posible update and keep the editForm Open... is thera a way to do this with?... may be AJAX Manager Request?
Eyup
Telerik team
 answered on 13 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?