Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
98 views
Hello,

Is there an easy way to replace the controls in for example editform.aspx pages for list types?
What we would like to do is replace a single line text field in sharepoint with an combobox that retrieves information from a web service. The retrieving of information from a web service isnt a problem but how to bind it to a sharepoint field?
Or is the only possiblity to create a custome field in sharepoint that uses the combobox?

With kind regards,
  Fabian
Fabian
Top achievements
Rank 1
 asked on 27 Oct 2009
3 answers
492 views
I am trying to add an image to a radgrid column that when hovered or clicked opens a context menu. The context menu contains a series of commands that i want to launch rad windows based on the command clicked and the datakey of the grid row.

I have found examples doing each thing individually but none that do this all together. Below is the code i am using. The showMenu Portion works fine. Now how do i get the contextmenuitem clicked and the datakeyname for the row it was clicked in so i can determine which radwindows to open pass it the productid for the row the contextmenu was clicked on?

Thanks for any help,
Kevin


<script type="text/javascript">  
       function showMenu(e)  
       {  
               var contextMenu = $find("<%= RadContextMenu1.ClientID %>");  
               if ((!e.relatedTarget) || (!Telerik.Web.DomUtility.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))  
               {  
                       contextMenu.show(e);  
               }  
               Telerik.Web.DomElement.cancelRawEvent(e);  
       }  
          
       function openDeleteWindow(ProductID)  
       {  
           var oPWResetWnd = radopen("../DeleteProductRequest.aspx?ProductID=" +ProductID, "RadWindow1" );  
           oPWResetWnd.Center();  
           oPWResetWnd.setSize(800,600);  
       }  
</script> 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" 
        GridLines="None">  
        <MasterTableView TableLayout="Auto" AutoGenerateColumns="False" 
            DataKeyNames="Product">  
            <Columns> 
                <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                    <ItemTemplate> 
                    <asp:Image ID="imgManage" runat="server" ImageUrl="~/Images/v3_btn_manage.gif"   
                        onmouseover="showMenu(event)" onclick="showMenu(event)" alt="" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue" Width="600px" 
        Height="400px" /> 
    <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Flow="Horizontal">  
        <Items> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Edit">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Delete">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
        </Items> 
    </telerik:RadContextMenu> 
 
 



ayush mohan
Top achievements
Rank 1
 answered on 27 Oct 2009
1 answer
122 views
Hi

I am using Tooltip manager and calendar control in tooltip I have displayed information from collections which I have stored in VeiwState but in several seconds it make reload of page and I lost the data. Could you help me where exaclly is the problem 

maybe this is any Ajax timeout ?

greetings
Dimiter  
Tsvetie
Telerik team
 answered on 27 Oct 2009
1 answer
208 views
I have a modal window that loads a dynamic user control when the page is loaded. I am having trouble using the javascript getelementbyid to find the textboxes and labels on the dynamic user control. This is what I have so far:

This is the page in the modal window that loads the user control dynamically.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load 
 
        Dim modalusercontrol As Control = LoadControl("~/ModalUserControl.ascx") 
        modalusercontrol.ID = "modalusercontrol" 
        Ph1.Controls.Add(modalusercontrol) 
 
    End Sub 

In the page load of the User control I am trying to find the elementbyid and fill the values. ModalUserControl is the name of the user control that I am loading dynamically into the window.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        Dim updateParentScript As String = "function ConfigureDialog() { " & _ 
                        "var oWindow = GetRadWindow();    " & _ 
                        "var oArg = oWindow.Argument;    " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewNameArea"")).ClientID %>').value;     " & _ 
                        "oArea.value = oArg.NameValue;  " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewProfessionArea"")).ClientID %>').value;   " & _ 
                        "oArea.value = oArg.ProfessionValue;    " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewLabelArea"")).ClientID %>').value;   " & _ 
                        "oArea.value = oArg.LabelValue;    " & _ 
                        "radWindow.Argument = arg;" & _ 
                        "}" 
        Page.ClientScript.RegisterStartupScript(Me.[GetType](), "oWindow", updateParentScript, True) 
 
        Form1.Attributes.Add("onload", "ConfigureDialog()") 
 
    End Sub 

Any help would be greatly appreciated. Thanks in advance.
-Eric


Fiko
Telerik team
 answered on 27 Oct 2009
2 answers
138 views
Hey folks,

I have a RadGrid, In a RadPageView, in a RadMultipage, in a RadWindow (I didn't have to tell you that, but it's funny when you say it out loud! :)).

Everything appears to be fine in IE6,7,8, Firefox 2 and 3, however...

In Chrome and Safari, the Row Heights in the grid are several more pixels than in IE and Firefox.  It's not a huge display issue, but an annoying one.

Also, in Opera, the row heights are actually a couple of pixels less.

I am using the built in Skin "Hay" for the RadGrid.

I've tried setting specific heights to the rows, to the grid, to the pageview, to the multipage, etc, etc, but nothing seems to affect Safari and Chrome.

Anyone have any ideas?

Thanks, Kuba

--Thats why the call it the World Wide WEB...  A tangled mess of similar but not quite compatible technologies...
George
Top achievements
Rank 1
 answered on 27 Oct 2009
4 answers
152 views
Hello,

We are trying to use the RadGrid like an "excel" grid, and it works fine, however when we try to loop through each cell, the "Text" property always shows up as "&nbsp".  However, when we use the "ExtractValues()" method, we can get the proper values.  All is fine and dandy, until we hit a column that is "ReadOnly".  The ReadOnly cell does not show up in the ExtractValues variable (which makes sense), but now I am back to square one as to how to get value from the cells by UniqueName.  We are using Telerik version 2009.2.826.35 (2009 Q2).  

foreach (GridDataItem row in RadGrid1.MasterTableView.Items) 
{ 
  var cell = row["MyUniqueName"]; 
  Response.Write(cell.Text); // This comes out to be "&nbsp;" each time. 
} 


Any help in directing me in the right direction would be greatly appreciated.  Thanks.

Best Regards,

Patrick
Patrick Stecker
Top achievements
Rank 1
 answered on 27 Oct 2009
1 answer
136 views
Hello,

I want to databind whole radTreeview from a javascript call to the server.
In fact the scenario is the fallowing :
- One Treeview which display categories and sub categories from a database
- I add a new category with an ajax request to the server (ICallbackEventHandler)
- When the server callback, I want to rebind the treeview to display added category without reload the page

I've tried on several solutions like update panel, radajaxpanel, render new treeview and return html code, radajaxmanager and ajax request, but all have failed.

Can you help me please?

Best Regards,

Fabrice.
Yana
Telerik team
 answered on 27 Oct 2009
5 answers
217 views
I've run into (what seems to be) a fairly bad bug. I've got it down into a proof-of-concept page which follows below. On the page there's a RadGrid, a button and a RadTextBox. If you select a row and click the "Click Me" button, then the selected row's index should appear in the RadTextBox. Now virtual scroll paging is enabled, so scroll to the second page, select a row, and then click "Click Me". Here I get an exception. It appears that the RadGrid has somehow forgotten it has a row selected. Moreover, if I change the RadTextBox to a native ASP.NET TextBox the crash doesn't happen.

Any input would be appreciated.

Environment: Visual Studio 2005, ASP.NET 2.0 w/ MS AJAX extension, and Telerik.Web.UI.dll version 2009.1.609.20. (I know that there is a new version of Telerik.Web.UI.dll, but I dropped in the latest version and it didn't seem to help.)

Edit: Also this crash seems to be browser dependent. I've seen it in IE6, and on IE8 in compatibility mode. In "normal" IE8 and in Firefox the crash doesn't happen. I need it to work in IE6.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridTest.aspx.cs" Inherits="RxLink.WebForms.Testing.RadGridTest" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
  <title>Untitled Page</title> 
</head> 
<body> 
  <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="scriptManager" runat="server" /> 
    <telerik:RadGrid ID="grid" runat="server" AllowPaging="true" PageSize="10" 
        Width="200px" OnNeedDataSource="grid_NeedDataSource" PagerStyle-Visible="false"> 
      <ClientSettings EnablePostBackOnRowClick="true"> 
        <Selecting AllowRowSelect="true" /> 
        <Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" /> 
      </ClientSettings> 
    </telerik:RadGrid> 
     
    <asp:Button ID="button" runat="server" Text="Click Me" OnClick="button_Click" /> 
    <telerik:RadTextBox ID="radTextBox" runat="server" /> 
  </form> 
</body> 
</html> 
 


using System; 
using System.Collections.Generic; 
 
namespace RxLink.WebForms.Testing 
{ 
  public partial class RadGridTest : System.Web.UI.Page 
  { 
    protected void button_Click(object sender, EventArgs e) 
    { 
      radTextBox.Text = Convert.ToString(grid.SelectedIndexes[0]); 
    } 
 
    protected void grid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    { 
      grid.DataSource = GetRange(); 
    } 
 
    static IEnumerable<int> GetRange() 
    { 
      for (int i = 0; i <= 50; i++) 
      { 
        yield return i; 
      } 
    } 
  } 
} 
 
chrisjoelcowan
Top achievements
Rank 1
 answered on 27 Oct 2009
3 answers
336 views
Hi,
is it possible to export to csv without double quotes?

I could not find any solution for this.

Many Thanks
Alaeddin
Daniel
Telerik team
 answered on 27 Oct 2009
1 answer
78 views
Hi all,

i have this custom Button function which works fine for me. Bu now i want to extend this function with one check. I want to check if the inserted Div already exists and stop processing.

Here is my code:

Telerik.Web.UI.Editor.CommandList["Inhaltsverzeichnis"] = function(commandName, editor, args)  
{  
  if (document.getElementById("toc")) {   
    alert('Es existiert bereits ein Inhaltsverzeichnis-Tag im Content-Bereich!');  
  }  
  else {   
    editor.pasteHtml('Inhaltsverzeichnis<br /><br /><div id="toc">-Inhaltsverzeichnis-</div><br /><br />');   
    alert('Inhaltsverzeichnis wurde erfolgreich hinzugefuegt!');  
  }  
};  

The div with the id = toc definitly exists, but my code always goes to the Else part of the if statement. Whats wrong?

thank you
yavuz
Stanimir
Telerik team
 answered on 27 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?