Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
137 views

I'm using the RadMenu to show different UserControls, which are basically forms, that cause a PostBack when the buttons within them are clicked.  I had been using RadToolTips for these, but thought the RadMenu treatment looked better.  Now I'm wondering if maybe RadMenus aren't meant to be used this way?

Anyways, the problem I'm having is that whenever I execute a PostBack in the usercontrol, which is embedded in a RadMenuItem, it doesn't do a PostBack, and there is some Javascript error in the ScriptResource.axd that causes the page to become unstable - none of the controls seem to work after that until I reload the page.  I do have all of the RadMenus within an UpdatePanel, so Ajax is enabled and being used.  When I replace these menu items with tooltips, with the same usercontrols embedded within them, the postbacks DO work, so I'm just wondering if there is something I need to do in the command for these buttons because they are embedded in a RadMenuItem?  Here's an example of the code I use to add the UserControl to the RadMenuItem:

var followUp = menuSourceControl.FindItemByText("FollowUpScreen");
if(followUp != null)
{
    var followUpForm = LoadControl("~/controls/popups/FollowUpForm.ascx");
    ((FollowUpForm)followUpForm).RID = rid;
    followUp.Controls.Add(followUpForm);                
}

I couldn't find any mention or example of this on the site, but would welcome any guidance on this.

Thanks!
Eddie

Kate
Telerik team
 answered on 17 May 2011
5 answers
224 views
How do I get the client id drop down in a grid from within a javascript function?

Thank you

Regards
Raj
Shinu
Top achievements
Rank 2
 answered on 17 May 2011
1 answer
115 views

Hi all,

Hi all,

I'm using client side data-binding in a master-detail grid scenario.  The two grids are within an asp:form where the key in the form is in a hidden field.  The form key I use to filter the master and then the master row selected to filter the detail.

The problem I'm having is the master databind is being called multiple times even if the page is fully loaded.  It happens when the page is loaded and when I selected a row from the master.

I'm using a web service as a datasource.

Here's the Jscript.

function RadGrid1_DataBinding(sender, args) {
     
  }
  function RadGrid1_Command(sender, args) {
      // Handle the RadGrid's Command event here  
  }
  function RadGrid2_Command(sender, args) {
      // Handle the RadGrid's Command event here  
  }
  var ponumber = "";
  function RadGrid1_RowSelected(sender, args) {
      ponumber = args.get_tableView().extractKeysFromItem(args.get_gridDataItem().get_element())["ponumber"];
      rdPODet = $find('<%= rlMOView.FindControl("RadGrid2").ClientID %>');
      rdPODet.get_masterTableView().filter("ponumber", ponumber, "EqualTo");
  }
function RadGrid1_DataBound(sender, args) {
    var tableView = sender.get_masterTableView();
    // pull the MO data key to bind the details
   // var mfgOrdID = parseInt(document.getElementById('ctl00_MainContent_hdnMfgKey').value);
    var mfgOrdID = parseInt(document.getElementById('ctl00_MainContent_rlMOView_hdnMfgKey2').value);
    tableView.filter("mfgorderid", mfgOrdID, "EqualTo", true);
    var dataItems = tableView.get_dataItems();
    if (dataItems.length == 0) {
        args.set_cancel(true);
    } else {
       tableView.selectItem(0);
    }
}
function RadGrid2_DataBinding(sender, args) {
    if (ponumber === "") {
        args.set_cancel(true);
    }
}



Here's the web Service:
using System;
using System.Linq;
using System.Runtime.Serialization;
using System.Web.Services;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Collections.Generic;
using System.Collections;
using Telerik.Web.UI;
using System.Reflection;
  
namespace DataContracts
{
    [DataContract]
    public class MO_POHdr
    {
         [DataMember]
        public int MfgAssocDocID { get; set; }
        [DataMember]
        public int mfgorderid { get; set; }
        [DataMember]
        public string ponumber { get; set; }
        [DataMember]
        public string vendname { get; set; }
        [DataMember]
        public string vendorid { get; set; }
        [DataMember]
        public string country { get; set; }
        [DataMember]
        public string vndclsid { get; set; }
        [DataMember]
        public DateTime? docdate { get; set; }
        [DataMember]
        public string hold { get; set; }
        [DataMember]
        public string shipmthd { get; set; }
    }
  
    [DataContract]
    public class PODet
    {
        [DataMember]
        public string ponumber { get; set; }
        [DataMember]
        public string itemnmbr { get; set; }
        [DataMember]
        public decimal? qtyorder { get; set; }
        [DataMember]
        public string itemdesc { get; set; }
        [DataMember]
        public string postatus { get; set; }
        [DataMember]
        public string shipmthd { get; set; }
        [DataMember]
        public DateTime? released_date { get; set; }
        [DataMember]
        public DateTime? prmshpdte { get; set; }
        [DataMember]
        public DateTime? reqdate { get; set; }
    }
}
  
public class MyData
{
    public int Count { get; set; }
    public IList Data { get; set; }
}
  
[ServiceContract]
[ServiceKnownType("GetKnownTypes")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class GridMasterDetailsService
{
    public static IEnumerable<Type> GetKnownTypes(ICustomAttributeProvider provider)
    {
        List<Type> knownTypes = new List<System.Type>();
  
        knownTypes.Add(typeof(DataContracts.MO_POHdr));
        knownTypes.Add(typeof(DataContracts.PODet));
        return knownTypes;
    }
  
    [OperationContract]
    public MyData GetMOPOHdrDataAndCount(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)
    {
        string fe = "";
        if (filterExpression != "")
        {
            fe = filterExpression.Replace("\"", string.Empty);
        }
        GridBindingData data = RadGrid.GetBindingData("AppDataClassesDataContext", "MO_POHdrs", startRowIndex, maximumRows, sortExpression, fe);
        MyData result = new MyData();
        result.Data = data.Data.OfType<MO_POHdr>().Select(c => new DataContracts.MO_POHdr()
        {
            MfgAssocDocID = c.MfgAssocDocID,
            mfgorderid = c.MfgOrderID,
            ponumber = c.ponumber,
            vendname = c.vendname,
            vendorid = c.vendorid,
            country = c.country,
            vndclsid = c.vndclsid,
            docdate = c.docdate,
            hold = c.hold,
            shipmthd = c.shipmthd
        }).ToList();
        result.Count = data.Count;
        return result;
    }
  
    [OperationContract]
    public MyData GetPODetDataAndCount(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)
    {
        GridBindingData data = RadGrid.GetBindingData("AppDataClassesDataContext", "PODets", startRowIndex, maximumRows, sortExpression, filterExpression);
        MyData result = new MyData();
        result.Data = data.Data.OfType<PODet>().Select(o => new DataContracts.PODet()
        {
            ponumber = o.ponumber,
            itemnmbr = o.itemnmbr,
            qtyorder = o.qtyorder,
            itemdesc = o.itemdesc,
            postatus = o.postatus,
            shipmthd = o.shipmthd,
            released_date = o.released_date,
            prmshpdte = o.prmshpdte,
            reqdate=o.reqdate
        }).ToList();
        result.Count = data.Count;
        return result;
    }
}

Here are the grids:

<div style="width:715px;margin-bottom:5px;position:relative;">
                   <telerik:RadGrid ID="RadGrid1" runat="server"  AllowPaging="false" AllowSorting="false"  Height="100px" pagesize="200"  
                         AllowFilteringByColumn="false" GridLines="None" EnableEmbeddedSkins="false" Skin="WebBlue" ItemStyle-Font-Names="'segoe ui',arial,sans-serif;" ItemStyle-Font-Size="10px"
                              AlternatingItemStyle-Font-Names="'segoe ui',arial,sans-serif;"  AlternatingItemStyle-Font-Size="10px" HeaderStyle-Font-Names="'segoe ui',arial,sans-serif;"  HeaderStyle-Font-Size="10px">            
                         <MasterTableView ClientDataKeyNames="mfgorderid, ponumber" AllowMultiColumnSorting="false">
                           <CommandItemStyle CssClass="commViewCommand" />
                                 <ItemStyle CssClass="comments" />
                                 <AlternatingItemStyle CssClass="comments" />
                              <NoRecordsTemplate>
                               <div style="width:710px;">
                                 No assigned po details to display.</div>
                            </NoRecordsTemplate>
                             <Columns>
                                 <telerik:GridBoundColumn DataField="mfgorderid" ItemStyle-Width="0px" HeaderStyle-Width="0px"></telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn DataField="ponumber" HeaderText="PO#" ItemStyle-Width="40px"  HeaderStyle-Width="40px"/>
                                 <telerik:GridBoundColumn DataField="vendname" HeaderText="Vendor" ItemStyle-Width="400px"  HeaderStyle-Width="400px"/>
                                 <telerik:GridBoundColumn DataField="vendorid" HeaderText="VID" ItemStyle-Width="40px"  HeaderStyle-Width="40px"/>
                                 <telerik:GridBoundColumn DataField="docdate" HeaderText="Doc Dt" DataFormatString="{0:MM/dd/yy}" ItemStyle-Width="35px"  HeaderStyle-Width="35px"/>
                                 <telerik:GridBoundColumn DataField="shipmthd" HeaderText="Ship Via"  ItemStyle-Width="100px"  HeaderStyle-Width="100px"/>
                             </Columns>
                         </MasterTableView>
                         <ClientSettings>
                             <DataBinding Location="GridMasterDetailsService.svc"  FilterParameterType="Linq"  
                                 SelectMethod="GetMOPOHdrDataAndCount" SortParameterType="Linq"
                             </DataBinding>
                             <ClientEvents OnRowSelected="RadGrid1_RowSelected" OnDataBound="RadGrid1_DataBound"   />
                             <Selecting AllowRowSelect="true"/>
                               <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />
                                 
                         </ClientSettings>
                     </telerik:RadGrid>
                     </div>
                    
                  <div style="width:715px;margin-bottom:5px;position:relative;">
                         <telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="false" AllowSorting="True" Height="100px"
                             AllowFilteringByColumn="false" GridLines="None" PageSize="5" Skin="WebBlue" ItemStyle-Font-Names="'segoe ui',arial,sans-serif;" ItemStyle-Font-Size="10px"
                              AlternatingItemStyle-Font-Names="'segoe ui',arial,sans-serif;"  AlternatingItemStyle-Font-Size="10px" HeaderStyle-Font-Names="'segoe ui',arial,sans-serif;"  HeaderStyle-Font-Size="10px">            
                             <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed" ClientDataKeyNames="ponumber">
                             <CommandItemStyle CssClass="commViewCommand" />
                                 <ItemStyle CssClass="comments" />
                                 <AlternatingItemStyle CssClass="comments" />
                                              <NoRecordsTemplate>
                               <div style="width:710px;">
                                 No assigned non received po item details to display.</div>
                            </NoRecordsTemplate>
                                             <Columns>
                                              <telerik:GridBoundColumn DataField="ponumber" HeaderText="PO#" ItemStyle-Width="40px"  HeaderStyle-Width="40px"/>
                                 <telerik:GridBoundColumn DataField="itemnmbr" HeaderText="Item#" ItemStyle-Width="100px"  HeaderStyle-Width="100px"/>
                                 <telerik:GridBoundColumn DataField="qtyorder" HeaderText="Qty"  ItemStyle-Width="30px"  HeaderStyle-Width="30px"/>
                                 <telerik:GridBoundColumn DataField="itemdesc" HeaderText="Desc" ItemStyle-Width="410px"   HeaderStyle-Width="410px"/>
                                     <telerik:GridBoundColumn DataField="prmshpdte" HeaderText="PS Date"  DataFormatString="{0:MM/dd/yy}" ItemStyle-Width="35px"   HeaderStyle-Width="35px"/>
                                         </Columns>
                                     </MasterTableView>
                                     <ClientSettings>
                                       <DataBinding Location="GridMasterDetailsService.svc"  FilterParameterType="Linq"   
                                 SelectMethod="GetPODetDataAndCount" SortParameterType="Linq"
                             </DataBinding>
                                         <ClientEvents OnDataBinding="RadGrid2_DataBinding"   />
                                           <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
                                 </Scrolling>
                                     </ClientSettings>
                                 </telerik:RadGrid>
                 </div>


Any ideas??

Thanks, Jim..

Marin
Telerik team
 answered on 17 May 2011
1 answer
100 views
Hi,

We have been experimenting with Raddock controls for our portal look on a dash board page. One of the requirements is that each RadDockZone in the layout will have different skin. When a Raddock is dragged from one zone to another it should look like every other control in the zone. One of the approaches I have tried is to change the skin of the Raddock control in DockPositionChanged event on server side. But it is not working. Any hint on how this can be accomplished would be appreciated.

Thanks,
Rao
Pero
Telerik team
 answered on 17 May 2011
1 answer
65 views
I am having some issues with a page where I am using the xmlhttppanel...

It is my default homepage - ie,  www.somewebsite.com -> www.somewebsite.com/Default.aspx

however, unless i put in the url manually, and it includes the "Default.aspx", the XHR never completes?

it only happens with the website deployed on IIS - on my local it works fine.

can you guys supply me with any places to start diagnosing the issue?  help appreciated.  thanks.


EDIT:

I have determined that the error was a result of the IIS extension mapping for a directory not accepting a "POST" verb...

however i am not sure how to map an extension...  of a folder...

for now I have just set up a redirect, but if anyone has an alternate solution, please let me know.  thanks.
Pero
Telerik team
 answered on 17 May 2011
1 answer
75 views
Dear Support,

I have radgrid which needs to bind the data till 4th level. Since I have more than 50,000 records.
It  binds to 1st and 2nd level smoothly but when click for the 3rd level I gives me error for (Stop running this script? A script on this page is causing your web browser to run slowly........)
Has in one of your forum it was suggested that in (scriptmanager tag add ScriptMode='Release')
I added this.
I have also added : HierarchyLoadMode="ServerOnDemand"
But still it gives me other error like
Error during serialization or deserialization using the JSON JavaScriptSerializer.


Please suggest me the solution to overcome from this weird problem of radgrid hierarchy

Regards
Asif
Vasil
Telerik team
 answered on 17 May 2011
1 answer
121 views
I've made a page using RadAjaxManager, and it works perfectly.

I have RadAjaxManager.OnResponseEnd specified to set a few variables.

I've tried to add JQuery and when i add the following line
<script type="text/javascript" src="~/Scripts/jquery-1.4.1.min.js" />

the page errors and says that OnResponseEnd is undefined.

How do I get around this?
Maria Ilieva
Telerik team
 answered on 17 May 2011
4 answers
1.0K+ views
Hello everyone,

I am having issues with the ajax gridview control in an ASP.NET web project, and the problem seems to be simple.
The grid I am using has several columns with cells that contains alot of text. And these texts are overlapping each other. My first thought to this issue was a missing attribute.

Lets say, I have 5 columns, each column as default gets a 20% space for text to be displayed, however, the text in the cells doesn't stay within these 20% and overlaps the other cells creating a huge mess.

This happens in IE9 without compatibility view, Chrome, Opera and Safari.

BUT ... wait for it ... this isn't an issue in IE9 with compatibility view, IE7 / IE8 and the new Firefox browser.

Can I somehow post images to give a better view of what I'm referring to?

Appreciate any helpful replies/statements!

- Boesgaard
Peter Steiness
Top achievements
Rank 1
 answered on 17 May 2011
6 answers
380 views
Hi,
I'm new to RAD Controls and I was wondering if there is a way to avoid selection of weekend and a list of holiday dates from the the RAD Calendar while using a RadDatePicker?
Thanks,
Lok.
Pavlina
Telerik team
 answered on 17 May 2011
1 answer
111 views
hi
how can i get indeterminate node in treeview tri-state?
it return indeterminate node =>checkd
i want only checked item not indeterminate item
please help to me
thanks
Shinu
Top achievements
Rank 2
 answered on 17 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?