Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
220 views
In my tree I have a root node that all other nodes fall under.  I want this to act as a header and have different styles (background image, hover effect, etc..) than the rest of the tree. Is this possible and what classes would I use to achieve this?
Ivan Zhekov
Telerik team
 answered on 23 Aug 2011
1 answer
96 views
Hi. I've loved Telerik's products for some years now; best of breed with great support :)

Any chance the SAK can include the entire Telerik r.a.d. library of controls when it's released? It would sure make life easier for us SharePoint 2010 developers.

Also, any update on a release date? You're keeping us all in suspense!

Thanks and keep up the great work :)

P.S. Whether these other controls are included or not, we're all looking forward to the SAK.
Sebastian
Telerik team
 answered on 23 Aug 2011
3 answers
146 views
Hi

I have a Grid with NestedView Table which I create programmatically. 
Each row on the child table has a checkbox field which selects the whole row.
It has a custom Command header with an Image Button which is acting like an "Add to Cart" button.

When the button is clicked, I can access the selected child items like so:

if (e.CommandName == "AddToCart")
{
  if (RadGrid1.SelectedIndexes.Count == 0)
  {
     RadWindowManager1.RadAlert("No documents have been selected", 250, 100, "Add to Document Cart", "");
     return;
  }
  GridCommandItem Item = (GridCommandItem)e.Item;
  ImageButton btnAddToCart = (ImageButton)e.Item.FindControl("btnAddSelectedToCart");
  System.Collections.ArrayList doclist = new System.Collections.ArrayList();
  foreach (GridDataItem item in RadGrid1.SelectedItems)
  {
    doclist.Add(new HRTDocData(Convert.ToInt32(item["RecordID"].Text), Convert.ToInt32(item["DocID"].Text), item["DocTypes"].Text, item["DocReferences"].Text, item["DocContents"].Text));
  }
        }

I actually need to make a javascript call to some existing code with the list of selected items.  I have tried to access the same information from the client side but it isnt working - I just get null values - or not selected???
This is my js function
function GetChildValues() {
    var grid = $find("<%=RadGrid1.ClientID %>");
    var MasterTable = grid.get_masterTableView();
    var selectedRows = MasterTable.get_selectedItems();
    for (var i = 0; i < selectedRows.length; i++) {
        var row = selectedRows[i];
        var cell = MasterTable.getCellByColumnUniqueName(row, "RecordID")
        alert(cell); 
    }

What am I missing please?


 

Simon
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
100 views
I have a dynamic grid, in aspx page it's Defined visible="false", when I Defined him to visible=true in code, do not know the JavaScript functions defined page. The solution?
Vasil
Telerik team
 answered on 23 Aug 2011
3 answers
206 views
I tried to put AsyncUpload into one of my usercontrols, but I always  got null exception error when I tried to get addtional field at code behind. At first I thought that's user control's problem, but  later on, even I put the exact the same code as demo into my test page, I got the same null exception error  on this line :

<%#((Telerik.Web.UI.UploadedFile)Container.DataItem).GetFieldValue("TextBox").ToString()%>

Anyone else got same issue as I got? Pls take a look whenever you have time, really appreciate.

 
<telerik:RadScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" OnClientFileUploaded="onClientFileUploaded">
    </telerik:RadAsyncUpload>
    <telerik:RadButton ID="saveradbtn" runat="server" OnClick="saveradbtn_Click" Text="save image" />
    <asp:Label ID="labelNoResults" runat="server" Visible="True">No uploaded files</asp:Label>
    <asp:Repeater runat="server" ID="Repeater1">
        <ItemTemplate>
            <span style="font-weight: normal; font-size: 10px; color: black; position: relative">
                File info: <%#((Telerik.Web.UI.UploadedFile)Container.DataItem).GetFieldValue("TextBox").ToString()%>,<br />
                File name: <%# DataBinder.Eval(Container.DataItem, "FileName").ToString() %>,<br />
                File size: <%# DataBinder.Eval(Container.DataItem, "ContentLength").ToString() %><br />
                <br />
                <br />
            </span>
        </ItemTemplate>
    </asp:Repeater>
    <script type="text/javascript">
     //<![CDATA[
        var $ = $telerik.$;
 
        function onClientFileUploaded(radAsyncUpload, args) {
            var $row = $(args.get_row());
            var inputName = radAsyncUpload.getID("TextBox");
            var inputType = "text";
            var inputID = inputName;
            var input = createInput(inputType, inputID, inputName);
            var label = createLabel(inputID);
            $row.append("<br/>");
            $row.append(label);
            $row.append(input);
        }
 
        function createInput(inputType, inputID, inputName) {
            var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" />';
            return input;
        }
 
        function createLabel(forArrt) {
            var label = '<label for=' + forArrt + '>File info: </label>';
            return label;
        }
    //]]>
    </script>
 
 
--------------code behind-------------------------------------
 protected void saveradbtn_Click(object sender, EventArgs e)
        {
            if (RadAsyncUpload1.UploadedFiles.Count > 0)
            {
                labelNoResults.Visible = false;
                Repeater1.Visible = true;
                Repeater1.DataSource = RadAsyncUpload1.UploadedFiles;
                Repeater1.DataBind();
            }
            else
            {
                labelNoResults.Visible = true;
                Repeater1.Visible = false;
            }
        }
Peter Filipov
Telerik team
 answered on 23 Aug 2011
5 answers
797 views
Pretty simple question. I'm sure its quite easy but its causing me some trouble.

I've written these 2 lines, neither or which seem to pick up on the line breaks.

desc = Replace(Me.txt_description.Text, System.Environment.NewLine, "<br />")
 
desc = Replace(Me.txt_description.Text, vbCr, "<br />")
Alan T
Top achievements
Rank 1
 answered on 23 Aug 2011
3 answers
151 views
I got on a page 6 radcharts which are dynamically loaded when clicking on a button.

On my local server, I got no problem, the 6 radcharts are loading without any problem.
But on remote server, when I launch my ajax request, 2 to 4 of the charts load (not the same ones everytime), and for the remaining one, I get the following message :

"Error loading RadChart image.
You may also wish to check the ASP.NET Trace for further details.
Display stack trace?"

If I click OK, the website show me the chart that "couldn't be loaded".

I suppose the problem is that the answer to my ajax request come too soon and the website try to show an image that isn't finished to create, isn't it ?

If it's the case, is it a "delay" property or something to make the chart wait X seconds more before binding ?

Regards,
Nicolas
Evgenia
Telerik team
 answered on 23 Aug 2011
1 answer
69 views
I'm having an issue with using a few telerik comboxes. I have them setup like this:
<telerik:RadComboBox ID="ddlM" runat="server" Skin="Forest" Width="220px" ExpandDelay="10"
    AllowCustomText="true" MarkFirstMatch="true" OnClientSelectedIndexChanged="lookupValue"
    TabIndex="3" />

along with asp required field validators setup like this:
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="ddlM"
    Display="Dynamic" InitialValue="" Type="String" ValidationGroup="g1" ErrorMessage="required."
    Text=" X" />
<asp:RequiredFieldValidator runat="server" ID="CompareValidator2" ControlToValidate="ddlM"
    Display="Dynamic" InitialValue="Select" Type="String" ValidationGroup="g1" ErrorMessage="required."
    Text=" X" />

the problem i am having (and this problem is ONLY happening in IE9, not IE7 or IE8), is that when i enter custom values in the aforementioned combo box(s), the required field validators fire prompting me that input is required. If I choose something from the combox's list, its fine. I thought the validators validated the text property. It would appear that in IE9 this is not the case. Is there any guidance out there on this?
daniel
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
286 views
Hi,

Am currently evaluating RAD Controls, and haviong problems with a master/detail grid.

I have two entity data sets. Master=edsExpenseClaim Detail=edsExpenseDetail, the common ID between the two is ExpenseClaimID (a bigint in SQLServer database)

When browsing the grid the master grid is displayed correctly but when I expand to see the detail I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------


WhereParameters cannot be specified unless AutoGenerateWhere==true or Where is specified. 
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.InvalidOperationException: WhereParameters cannot be specified unless AutoGenerateWhere==true or Where is specified.


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.  



The page source is:

<%@ Page Title="" Language="C#" MasterPageFile="~/Accounts.Master" AutoEventWireup="true" CodeBehind="myClaims.aspx.cs" Inherits="Accounts.myClaims" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
    Accounts - My Expense Claims
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
        AllowPaging="True" AllowSorting="True" CellSpacing="0" 
        DataSourceID="edsExpenseClaim" GridLines="None">
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
<MasterTableView AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
            AllowAutomaticUpdates="True" DataKeyNames="ExpenseClaim_ID" 
            DataSourceID="edsExpenseClaim" AutoGenerateColumns="False">
    <DetailTables>
        <telerik:GridTableView runat="server" DataKeyNames="ExpenseDetail_ID" 
            DataSourceID="edsExpenseDetail" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="ExpenseClaim_ID" 
                    MasterKeyField="ExpenseClaim_ID" />
            </ParentTableRelation>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </telerik:GridTableView>
    </DetailTables>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>


<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>


<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
        Visible="True">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>


    <Columns>
        <telerik:GridBoundColumn DataField="ExpenseClaim_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ExpenseClaim_ID column" 
            HeaderText="ExpenseClaim_ID" ReadOnly="True" SortExpression="ExpenseClaim_ID" 
            UniqueName="ExpenseClaim_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Claimant_ID" DataType="System.Int64" 
            FilterControlAltText="Filter Claimant_ID column" HeaderText="Claimant_ID" 
            SortExpression="Claimant_ID" UniqueName="Claimant_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimCurrency_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ClaimCurrency_ID column" 
            HeaderText="ClaimCurrency_ID" SortExpression="ClaimCurrency_ID" 
            UniqueName="ClaimCurrency_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimStatus_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ClaimStatus_ID column" HeaderText="ClaimStatus_ID" 
            SortExpression="ClaimStatus_ID" UniqueName="ClaimStatus_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimDate" DataType="System.DateTime" 
            FilterControlAltText="Filter ClaimDate column" HeaderText="ClaimDate" 
            SortExpression="ClaimDate" UniqueName="ClaimDate">
        </telerik:GridBoundColumn>
    </Columns>


<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>


<FilterMenu EnableImageSprites="False"></FilterMenu>


<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="edsExpenseClaim" runat="server" 
        ConnectionString="name=AccountsEntities" 
        DefaultContainerName="AccountsEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="ExpenseClaims">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="edsExpenseDetail" runat="server" 
        ConnectionString="name=AccountsEntities" 
        DefaultContainerName="AccountsEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="ExpenseDetails"
        Where="it.ExpenseDetail.ExpenseClaim_ID = @ExpenseClaim_ID">
        <WhereParameters>
            <asp:SessionParameter name="ExpenseClaim_ID" Type="Int64" />
        </WhereParameters>
    </asp:EntityDataSource>
</asp:Content>


Any pointers to a solution would be most appreciated!!!

Cheers,

Charles
Charles
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
96 views
I have a RADTEXT box under MasterTableView EditFormTemplate. When i am trying to set any value using GetRegisteredServerElement from Client side its does not appear.

Please suggest me what to do..

Andrey
Telerik team
 answered on 23 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?