Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
Hi,
I'm using a GridDropDownColumn in a RadGrid. It loads fine and works fine, until I add ajax on the grid.
The reason for the ajax is that I need to reload the grid after a RadWindow has closed. I rebind the grid and need it to reload.

The manager looks like this:
<telerik:RadAjaxManager runat="server" ID="rdAjaxManager" OnAjaxRequest="rdAjaxManager_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rdAjaxManager">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdgdPartnerImportCode"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

The text fields in edit mode work fine but the dropdown column is disabled. I can select the text in the box but not do anything else.
I've been hitting a wall all day and could use some fresh ideas.
Robert
Top achievements
Rank 1
 answered on 18 Jun 2012
3 answers
156 views

I would like to use the XmlHttpPanel to display some content and I am trying to minimise server load.

I have a set of imagebuttons within a repeater control. Its the first time I've used the XmlHttpPanel. The XmlHttpPanel displays information from a specific database record defined by InfoId. I can set the repeater datasource with information containing InfoId. I could set the commandArgument for the buttons to  '<%# Eval("InfoId") %>' but that would then involve a postback to execute an OnCommand event. I therefore assume that it would be more efficient (a little like the First Look example in the demos) to have the imagebutton OnClientClick execute a javascript function that then sets the XmlHttpPanel value to the correct InfoId and the panel can then get the required information.

I have two questions: (1) am I write that dealing with the button click in javascript rather than a command postback would be more efficient and (2) that being the case can someone help me with how to set the OnClientClick property of the imagebutton in the repeater. I keep getting messages that the tag isn't well formed or some other error.

I'm assuming that the following javascript is fine (and it works if I hard code the OnClientClick property for a button):

<
script type="text/javascript">

 function myClientClick(index)

 {
var myControl = $find("<%= myXmlHttpPanel.ClientID %>");

 

myControl.set_value(index);

return false;

}
</script>


However, to make this work I need the OnClientClick property to be of the form: "return OnAdditionalSelect('x')" where x is the InfoId. If I use Eval("InfoId") I get errors and putting \' to try to get the single quotes around the id also causes a "tag not well formed" error.

 

Slav
Telerik team
 answered on 18 Jun 2012
3 answers
394 views
I am having some challenges trying to embed a RadGrid within a RadListBox.  Do I have to do a FindControl with OnItemDatabound?  Or can I do it on Page_Load()?  Any help or point me in the right direction would be greatly appreciated.

CODE BEHIND
  
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
  
namespace PortalWeb.Partners.Communications
{
    public class Person
    {
        public int RecipientID;
        public string RecipientName;
        public string RecipientType;
        public string CompanyName;
        public string ProgramName;
        public Person(int RecipientID, string RecipientName, string RecipientType, string CompanyName, string ProgramName)
        {
            this.RecipientID = RecipientID;
            this.RecipientName = RecipientName;
            this.RecipientType = RecipientType;
            this.CompanyName = CompanyName;
            this.ProgramName = ProgramName;
        }
    
  
  
    public partial class recipients : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        protected void RadGrdidRecipientList_Databound(object sender, RadListBoxItemEventArgs e)
        {
            // Dummy Data //
            List<Person> MyData = new List<Person>();
            MyData.Add(new Person(1, "John Doe", "OptIn", "FrogJoy", "UIRR"));
            MyData.Add(new Person(1, "Jane Doe", "OptIn", "YouTube", "TYRR"));
            MyData.Add(new Person(1, "Jillian Doe", "OptIn", "Intel", "FREE"));
            MyData.Add(new Person(1, "Happy Joe", "OptIn", "Hello Kitty", "POLG"));
            MyData.Add(new Person(1, "Rob Crandle", "OptOut", "McDonalds", "NYTH"));
  
            RadGrid myFilterGrid = new RadGrid();
            myFilterGrid = e.Item.FindControl("RecipientsGrid") as RadGrid;
            myFilterGrid.DataSource = MyData;
            myFilterGrid.DataBind();
        }
    }
}

ASPX PAGE
  
 <telerik:RadListBox ID="RecipientFilterList" runat="server" OnItemDataBound="RadGrdidRecipientList_Databound" Width="450px" Height="300px"
            SelectionMode="Multiple" AllowTransfer="true" TransferToID="RecipientSelectList"
            AutoPostBackOnTransfer="true" AllowReorder="true" AutoPostBackOnReorder="true"
            EnableDragAndDrop="true">
            <ItemTemplate>
                <telerik:RadGrid ID="RecipientsGrid" runat="server" AllowFilteringByColumn="True"
                    GroupingSettings-CaseSensitive="false" AllowPaging="True" AllowSorting="True"
                    GridLines="Horizontal" AutoGenerateColumns="false" ShowHeader="true" PageSize="50"
                    MasterTableView-Width="100%">
                    <HeaderStyle Font-Bold="true" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                        Font-Underline="False" ForeColor="#333333" Wrap="False" />
                    <AlternatingItemStyle BackColor="#EEEEEE" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                        Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                    <MasterTableView AllowFilteringByColumn="True" ItemStyle-Width="100%" NoMasterRecordsText="No Recipients Found"
                        NoDetailRecordsText="No Recipients Found" Visible="true" ShowHeadersWhenNoRecords="true">
                        <NoRecordsTemplate>
                            <div align="center">
                                No Recipients Found</div>
                        </NoRecordsTemplate>
                        <Columns>
                            <telerik:GridBoundColumn DataField="RecipientName" HeaderText="Recipients" UniqueName="RecipientName"
                                SortExpression="RecipientName" ShowSortIcon="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecipientType" HeaderText="Type" UniqueName="RecipientType"
                                SortExpression="RecipientType" ShowSortIcon="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CompanyName" SortExpression="CompanyName"
                                HeaderText="Companies" UniqueName="CompanyName" ItemStyle-HorizontalAlign="left"
                                ShowSortIcon="false" HeaderStyle-HorizontalAlign="left" HeaderStyle-Wrap="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Programs" UniqueName="ProgramName"
                                ShowSortIcon="false" ItemStyle-HorizontalAlign="Left" SortExpression="NumberContacts">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecipientID" Visible="false">
                            </telerik:GridBoundColumn>                           
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False">
                    </ClientSettings>
                </telerik:RadGrid>
            </ItemTemplate>
        </telerik:RadListBox>
        <telerik:RadListBox ID="RecipientSelectList" runat="server" Width="450px" Height="300px"
            SelectionMode="Multiple" AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true">
            <Items>
            </Items>
        </telerik:RadListBox>
 
Princy
Top achievements
Rank 2
 answered on 18 Jun 2012
5 answers
317 views
Hi,
  I have created an admin task which is a long operation and during this operation I need to show a grid with a status about each operation completed during the process.
How can I use the ajax manager with a rad grid to constantly udpate the grid as the process is running?

Any ideas or links to samples is helpful.

Thanks
Vlad
Telerik team
 answered on 18 Jun 2012
1 answer
195 views
Hi,

1) When the item is clicked in the treeview, the default value (datefieldID) of the clicked event should be retrieved. & further based on this value certain server side events can be called.

Request to provide the sample code for this.

2) "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element", this error comes in case the value is NULL for the 1st parentID (root). On continue, the tree view is populated. Suggest some solution for this. Have added one 0 value as the ParentID, still the error comes.

Thanks in advance
Plamen
Telerik team
 answered on 18 Jun 2012
6 answers
978 views
Hi all,

i have an sql stored procedure that result in multiple data sets....

i get the data using ado.net and fill them in dataset...

then i use the needdatasource ecevnt to bind my grid with dataset...

the result always that the grid is bounded only to the first datatable in this dataset!!!! and i am sure that this dataset has more than one datatable....

i need to display the results from all datatables in this dataset using one grid....

all datatables have the same structure of columns....

    protected void gvData_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            getData();
              
        }
  
  protected void getData() 
        {
            try 
            {
                                  DataSet ds ;
                                 //code to get data from database through classes.
                             if (ds != null ) {
                                               gvData.DataSource = ds
                    }
                    else { 
                    //show error while getting data, contact your system admin
                    }
                }
catch (Exception ex)
            {
                //handle exception code
            }
        }


is is feature supported in RadGrid?
and if yes, what is wrong with my code???

please help me very soon...

thanks

Asa'ad
Asa'ad
Top achievements
Rank 1
 answered on 18 Jun 2012
5 answers
152 views
Hi Guys,

I saw the below link
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

In this can i move the Add New which is at the top to be placed out side of the grid i.e a button which does the Add new record operation

Thanks
Karthik.K
Karthik Kantharaj
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
117 views
I have created a RadTreeView in a web page.  it is displaying and working properly.  However, I am trying to create a node and add it to the TreeView using the example found at http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/clientsideapi/defaultcs.aspx.  When I do that, it is failing.  The code I am using is:

function addNode() {
        treeView.trackChanges();
        var node = new Telerik.Web.UI.RadTreeNode();
        node.set_text(FeatureNameText.get_value());
        var parent = treeView.get_selectedNode() || treeView;
        parent.get_nodes().add(node);
        if (parent != treeView && !parent.get_expanded())
            parent.set_expanded(true);
        treeView.commitChanges();
        return false;
    }

When stepping through the above code, it gets to the node.set_text and throws an exception that says node is null or not an object.  What am I doing wrong here?
Princy
Top achievements
Rank 2
 answered on 18 Jun 2012
1 answer
64 views
Hy,

I have a radcombobox inside itemtemplate of a radgrid and i want to show radcontextmenu on this radcombobox.

Help me

Thnx
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2012
4 answers
460 views
Hi TelerikTeam,

I have a RadCombobox,when selecting the item in the RadCombobox and click on enter button,i need to trap Click event of the 'btnGo' Button event.

 

<telerik:RadComboBox ID="rcbTest" runat="server" Width="200px" Skin="Web20" AllowCustomText="true" MarkFirstMatch="true" AutoPostBack="true" OnSelectedIndexChanged="rcbTest_OnSelectedIndexChanged">
    <Items>
        <telerik:RadComboBoxItem Text="Test1" Value="1" />
        <telerik:RadComboBoxItem Text="Test2" Value="2" />
        <telerik:RadComboBoxItem Text="Test3" Value="3" />
        <telerik:RadComboBoxItem Text="Test4" Value="4" />
        <telerik:RadComboBoxItem Text="Test5" Value="5" />
    </Items>
</telerik:RadComboBox>
  
<asp:Button ID="btnGo" runat="server" Text=" Go " Width="75px"  OnClick="btnGo_Click"/>

Please tell me how can i acheive this scenario.

Thank You
Shaik Nazeer Hussain

 

nazeer
Top achievements
Rank 1
 answered on 18 Jun 2012
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?