Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
78 views
Hi,

I need a help regarding the Read menu with WCF and radgrid. 

I have a red grid with template column. In Template column there is a RedMenu. That rad menu items will be desided (when expand get from WCF service) . I followed the link below. It worked well.  

http://www.telerik.com/help/aspnet-ajax/menu-items-wcf-service.html.

But in my case I need to pass data from the row in DataGrid to WCF service. For example will assume grid containes Order details and column with "Order Number". I need to pass the "Order Number" to the WCF method as done in above sample.

sample has done this using js method as follows.

function OnClientItemPopulatingHandler(sender, e) 
    {        
        var context = e.get_context();
        //using jQuery to get the checked item and pass it to the server        
        context["ProductSuite"] = $telerik.$("input[name='rblSuites']:checked").val();
    }

I need to do this as follows

function OnClientItemPopulatingHandler(sender, e) 
    {        
        var context = e.get_context();
        //using jQuery to get the checked item and pass it to the server        
        context["OrderNumber"] = GET THE ORDER NUMBER FROM ROW BELONGS TO THE RADMENU.
    }

can anybody help me to resolve this ?

Thank you
Dinesh
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
42 views
Good afternoon friends of telerik! I am new in the area of programming ... and I would like an example (code) how can I do to select the lines of my RadGrid via a Checkbox ...



Thank you for the attention!

Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
3 answers
195 views
How to set css for the radbutton so that it is displayed as image?
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
2 answers
148 views
Hi, 

I've just published a website I've developed (using Visual Studion 2010 using .NET 4.0) in my IIS Server. I have two pages I'm testing: the Login page which does not contain any Telerik controls and another page to which I am directed after logging in. This second page now contains Telerik controls.

Unfortunately, the page is not rendered at all and I'm getting this error instead. 

An unhandled exception occured...

Error Message: Object reference not set to an instance of an object.
Stack Trace: at Telerik.Web.UI.ScriptEntrySlot.GetSerializedAssemblyInfo(ScriptEntry scriptEntry) at Telerik.Web.UI.ScriptEntryUrlBuilder.TryAddScriptEntry(ScriptEntry scriptEntry) at Telerik.Web.UI.ScriptEntryUrlBuilder.RegisterScriptEntry(ScriptEntry scriptEntry) at System.Web.UI.ScriptManager.RegisterScripts() at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Is there something you could suggest that I could check or change?
Daryl
Top achievements
Rank 1
 answered on 22 Aug 2012
6 answers
66 views
Hi

I am using PanelBar as a 2-level menu, and have set ExpandMode="SingleExpandedItem"  PersistStateInCookie="True" and this works as expected.

However, I would like to have the open item close when the user clicks another top level menu item even if the clicked item does NOT have any child items in it. 

How can I achieve this behaviour?  Can someone help with this?  

I need to achieve this because I realize after user testing that it is the user expectation!

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 21 Aug 2012
3 answers
143 views
Hi all,
I am trying to use radlistbox with ajax listsearch extender but it is giving error like
"

Extender control 'ajaxListSearchExtender' cannot extend 'RadListBoxSource'. Extender controls of type 'AjaxControlToolkit.ListSearchExtender' cannot extend controls of type 'Telerik.Web.UI.RadListBox'.

"
how can i do this...

i have 500 items in listbox i want to do listsearch...
help me...
Joseph
Top achievements
Rank 1
 answered on 21 Aug 2012
2 answers
253 views
Hi, all.
A bit new to web development but not new to software development.
Web application is using Telerik grid and upload controls. Everything is working as expected on development machine.
How it was deployed on the server: copied everything including bin folder to the server. Telerik.Web.UI.dll is there. File version-2011.1.315.40. Product version -2011.1.315.40.
Checked app pools, frameworks are same for app pool and for web application.
When started on the server I am getting to login screen OK. Login screen is passed to next screen that is using Telerik control and there I am keep getting "Could not load file or assembly 'Telerik.Web.UI, Version=2011.1.315.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified."

Thank you,
Alex.
Alex
Top achievements
Rank 1
 answered on 21 Aug 2012
1 answer
95 views
Is it possible to make it so that when the RibbonBar is in the minimized mode and tabs are accessed that the menu content is shown above other content on the page to avoid everything getting pushed down??
Adam Nelson
Top achievements
Rank 2
 answered on 21 Aug 2012
4 answers
1.3K+ views
OK, I have a radgrid with a GridButtonColumn (below)
<telerik:RadGrid ID="grdOrderedItems" OnNeedDataSource="OrdItem_NeedDataSource"
    OnItemDataBound="OrdItemDatabound" runat="server" AutoGenerateColumns="False" AllowPaging="False">
    <ClientSettings>
        <Scrolling AllowScroll="True" ScrollHeight="250px" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
    <MasterTableView NoMasterRecordsText="You have no ordered items att his time.">
        <Columns>
            <telerik:GridBoundColumn HeaderText="Order Number" DataField="OrderNumber"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Item Number" DataField="ItemNumber"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Item Name" DataField="ItemName"></telerik:GridBoundColumn>
            <telerik:GridButtonColumn HeaderText="View Custom Print" UniqueName="btnView" DataTextField="CustomID"></telerik:GridButtonColumn>
            <telerik:GridBoundColumn HeaderText="Custom ID" DataField="CustomID" Visible="False"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Friendly Name" DataField="FriendlyName" Visible="False"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Ordered By" DataField="OrderedBy"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Shipped?" DataField="Shipped"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

I want to have an onclick event with a command argument
I kind of have it - but this line
                     btnView.Attributes.Add("OnClick", "LoadProof(null, null)"); 
gives me some issues...
protected void OrdItemDatabound(object sender, GridItemEventArgs e)
{
    if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem itemValue = (GridDataItem)e.Item;
 
            LinkButton btnView = (LinkButton)itemValue["btnView"].Controls[0];
            btnView.Attributes.Add("OnClick", "LoadProof(null, null)");
            btnView.CommandArgument = string.Format("return Click('{0}';", itemValue.GetDataKeyValue("CustomID"));
        }
    }
}

I need to fire this block of code:
protected void LoadProof(object sender, EventArgs e)
{
    //.... do some stuff
}

But I can't figure out how to call the object and arguments - for the onclick:
btnView.Attributes.Add("OnClick", "LoadProof(null, null)");
Any suggestions?  I know, it shouldn't be "null, null" - but I can't use "sender, e" - Visual Studio doesn't like it.
Mark
Top achievements
Rank 1
 answered on 21 Aug 2012
3 answers
513 views
After the postback of the RadGrid in one update panel, the custom validator in another panel fires numerous times. The more postbacks you do on the RadGrid, the more times the validator will fire.

Here is the sample code. Watch "Count: 0" before a postback and after selecting a row or two in the RadGrid.

Before postback, the validator runs once every time you change the textbox or press the button. After selecting a couple of grid rows, it will fire multiple times....

You can execute the validator by changing the text in the text box to anything other than "hello"...

Move the validator out of the ajaxified table and it works as expected...

How can I have the custom validator inside the ajaxified table act properly after postback?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="TestValidation.Default2" %>
 
<%@ 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">
 
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        RadGrid1.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
    }
 
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        var items = new List<dynamic>()
            {
                new { Col1 = "ABC", Col2 = "DEF" },
                new { Col1 = "123", Col2 = "456" }
            };
 
        RadGrid1.DataSource = items;
    }
</script>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="RadGrid1" runat="server" Height="100px" Width="400px">
        <MasterTableView Name="ChargePaymentTable" TableLayout="Fixed" AutoGenerateColumns="true">
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
    </telerik:RadGrid>
    <br />
 
    <div id="div1">Count: 0</div>
 
    <%--<div>
        <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1"
            Text="FORMAT" ValidationGroup="CheckGroup" ClientValidationFunction="CheckText"></asp:CustomValidator>
    </div>--%>
 
    <table id="Table1" runat="server">
        <tr>
            <td>
                Hello?
                <asp:CustomValidator ID="CustomValidator2" runat="server" ControlToValidate="TextBox1"
                    Text="FORMAT" ValidationGroup="CheckGroup" ClientValidationFunction="CheckText"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Check" ValidationGroup="CheckGroup" />
            </td>
        </tr>
    </table>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    <telerik:AjaxUpdatedControl ControlID="Table1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script language="javascript" type="text/javascript">
 
            var checkCount = 0;
 
            function CheckText(sender, args) {
                $telerik.$("#div1").html("Count: " + ++checkCount);
                args.IsValid = (args.Value == "hello");
            }
 
        </script>
    </telerik:RadScriptBlock>
    </form>
</body>
</html>

Milena
Telerik team
 answered on 21 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?