Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
207 views
Hi,
I have created a radgrid and making order by this grid i am creating dynamic rows as user required. grid display on click of button that is outside from grid and display with single row when user make insert first row item detail then user click add new row then display new row but while click on new row previous row detail lost.
plz suggest me what is the reason for that or how can i use session view state effectively.
here i am attaching link of my code that i posted previously.
i am waiting our forum response eagerly...
how can i save session/viewstate and again from session to database..anamically.aspx
Thanks
Daniel
Telerik team
 answered on 17 Nov 2010
1 answer
68 views
Hi,

using the below code I can copy the excell data and paste it into rad grid and I donot have any problem but if I use RadcomboBox in EditItemTemplate then i can't able to read the values in Mozilla and safari. In I.E it's working fine.
EditItemTemplate

function pasteFromExcel() {
            if (!lastFocused) return;
            var browser = navigator.appName;
            if (browser == "Microsoft Internet Explorer") {
                var clipData = window.clipboardData.getData('Text');
                var crlf = String.fromCharCode(13) + String.fromCharCode(10);
                var table = clipData.split(crlf);
                for (var tRow = 0; tRow < table.length - 1; tRow++)
                    table[tRow] = table[tRow].split(String.fromCharCode(9));
                Array.remove(table, table[table.length - 1]);
                fillTable(table);
            }
            else {

                var clipDiv = document.getElementById("Div1");
                clipDiv.style.display = "block";
                var clipBoardText1 = document.getElementById("clipboardtext1");
                clipBoardText1.style.visibility = "visible";
                if (clipBoardText1.value != "") {
                    var clipData = clipBoardText1.value;
                    var table = clipData.split("\n");
                    for (var tRow = 0; tRow < table.length - 1; tRow++)
                        table[tRow] = table[tRow].split(String.fromCharCode(9));
                    Array.remove(table, table[table.length - 1]);
                    fillTable(table);
                    clipBoardText1.value = "";
                    clipDiv.style.display = "none";
                }
            }
        }


Thanks & Regards,

Thippa Reddy
Tsvetoslav
Telerik team
 answered on 17 Nov 2010
2 answers
168 views
Hi. Sorry, I'm just a bit nerd using this controls.
 What I'm trying to do is quite simple: I want to display  treeview with some nodes linked to PDF files. Whe you click on that node, I want the PDF to open in a new Window. I populate the tree with data from a Database using  the Adjacency List Model. In the event RadTreeView1_NodeDataBound, I set the NavigateUrl property of the node this way:

e.Node.NavigateUrl = "javascript:window.open('" + PDFpath + "')"

where PDFpath is a valid URL to the PDF I want to show in a new window. It work's fine (the PDF is opened in a new window), but the treeView displayed on the main page vanished, and show the word : "[object]". What I'm doing wrong?.

The code I'm using on the ASP page is quite simple, as you can see:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWeb._Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 271px;
        }
    </style>
     
</head>
<body>
 
    <form id="form1" runat="server">
   <%-- <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" DecoratedControls="Fieldset" />--%>
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
    <table class="style1">
        <tr><td colspan ="2">
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="llenar TreeView" />
             <asp:Button ID="Button2" runat="server" onclick="Button2_Click"Text="Expediente 1" />
            </td>
          
        </tr>
         
        <tr>
                <td class="style2" valign="top">
     
        <fieldset >
        
            <telerik:RadTreeView ID="RadTreeView1" Runat="server"
                LoadingMessage="Cargando ..." Skin="Outlook"
                onnodedatabound="RadTreeView1_NodeDataBound" />
             
        </fieldset>
                </td>
                <td>
                    <asp:GridView ID="GridView1" runat="server">
                    </asp:GridView>
                </td>
            </tr>
        </table>
     
    </div>
    </form>
</body>
</html>

Thank's in advance
Julio Loizaga
Top achievements
Rank 1
 answered on 17 Nov 2010
27 answers
2.5K+ views
I have a RadGrid and when a use clicks on the Edit image a RadWindow opens with the record that they need to edit. After the user updates the information the use clicks the X in the top corner to close the window. I need to know how to set the RadGrid to then Refresh to show the updated data. I tried to use the OnClientClick and added the JavaScript:

onDispose()
{
top.location.reload()
}

When I used this the page went into a loop on page load. I put this code on the parent page where I am using the RadWindowManager. Can anyone help me with a solution to this?
Iana Tsolova
Telerik team
 answered on 17 Nov 2010
4 answers
130 views
I have radmenu inside a template column of a radgrid, there is a radmenuitem with text "New Event". When this particular radmenuitem is clicked i want to open a radwindow. Is this possible to achieve?
thanks in advance
sf
Top achievements
Rank 1
 answered on 17 Nov 2010
1 answer
74 views
I have a simple RadGrid that I need to export to Excel, Word, PDF and CSV. I've tried many ways found online but none have worked for me.  here is what I have.

1. Master Page contains Microsoft ScriptManager control.
2. Update Panel contains the Content Page.
3. Grid is setup to export. 
4. The columns of the grid are build dinamically like the example before:
column = new GridBoundColumn();
((GridBoundColumn)column).DataField = col.Name;
((GridBoundColumn)column).HeaderText = col.Title;
((GridBoundColumn)column).HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
grid.MasterTableView.Columns.Add(column);

When I try to export for any of the formats, the header text is not visible.

Anyone know how to fix this?
Daniel
Telerik team
 answered on 16 Nov 2010
2 answers
195 views
I have this radgrid that otherwise works as expected.

For the first time I've tried using a footer with aggregate functions.  I really only care about Sum of the last column, but when that didn't work I tried different agg functions on each column as you can see below and they all have the same result, which is to display "Sum : " in the footer (or whatever agg function I selected).

I'm using a datasource that is a list of business objects.  The property ValueChange is a reaonly Decimal.

Below is my mark up and I'm attaching a screen shot.

Can you think of why this might not work?

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" DataSourceID="dsTransactionDetails" GridLines="None"
    Skin="WebBlue" Width="812px">
    <MasterTableView DataSourceID="dsTransactionDetails" AllowCustomPaging="True" 
        ShowFooter="True" >
        <Columns>
            <telerik:GridBoundColumn DataField="PhaseCode" HeaderText="PhaseCode" SortExpression="PhaseCode"
                UniqueName="Phase Code" Aggregate="None">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CategoryCode" HeaderText="CategoryCode" SortExpression="CategoryCode"
                UniqueName="Category Code" Aggregate="Count">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="OldValue" DataType="System.Decimal" HeaderText="Old Value"
                SortExpression="OldValue" UniqueName="OldValue" Aggregate="Min">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="NewValue" DataType="System.Decimal" HeaderText="New Value"
                SortExpression="NewValue" UniqueName="NewValue"  Aggregate="Max">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ValueChange" DataType="System.Decimal" HeaderText="Change"
                SortExpression="ValueChange" UniqueName="ValueChange" Aggregate="Sum"
            </telerik:GridBoundColumn>
        </Columns>
        </MasterTableView>            
</telerik:RadGrid>
Quinten
Top achievements
Rank 1
 answered on 16 Nov 2010
3 answers
92 views
Hi,
I am using a RadAlert widow to show a warning message through java script. The window shows up fine but if there is a Silverlight (not telerik) control on the page, it shows behind it. I tried chaging the z-index it does not work. I changed the overlay property of RadWindowManager to True but it shows strange behavior. After changing this property, it shows some part on top and some part behind the silverlight control.

Note: The page is dynamically created and the RadWindowManager is added to another custom control dynamically.


Any help in this regard would be appreciated.

Thanks,
-Kashif
Kashif
Top achievements
Rank 1
 answered on 16 Nov 2010
3 answers
109 views
How can one centralize a numeric character in a RadNumericTextBox? By default, the text seems to be lef aligned. I have tried to use

style.value = "text-align:right"   but this does not seem to work.

Hope to hear from someone soon.

Thanks in advance
Jeffrey
Top achievements
Rank 1
 answered on 16 Nov 2010
1 answer
170 views
I have a page with a ContextMenu on it. The ContextMenu has an option where it opens up a RadWindow. Inside the window there are different buttons that close the RadWindow then send back an argument to the page indicating which button was clicked. I then take this argument and using the OnClientClose event on the RadWindow run a javascript function that is supposed to "click" the ContextMenu on the page using the __doPostBack function.

function OnClientclose(sender, eventArgs){
  var arg = eventArgs.get_argument();
  if(arg)
  {
    __doPostBack("'" + RadContextMenu.ClientID.Replace("_", "$") + "'", arg);
  }
}

The ContextMenuItem that is clicked is determined by the argument passed, the argument is either a 0,1, or 3 which is the location of the item in the ContextMenu (see contextmenu.gif). I have checked that the argument being passed back is correct. I have used the __doPostBack function in the past to click on a ContextMenu in exactly the same fashion. I have checked the page source and the ID in the __doPostBack matches the ID of the ContextMenu exactly except all the _ have been replaced by $ which was needed before to have it work. Any ideas why I cannot get it to trigger a "click" this time?

Thanks,
Dan Miller
Cori
Top achievements
Rank 2
 answered on 16 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?