Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
102 views
I used tabstrip and multipage to build tabbed view .user contents dynamic loaded .i test how to get  the value by client select row .now i encounter a  strange situation. when i open two tabs A and B,I select tab A and click a row in Grid A ,the selected value can be displayed in a textbox well.then i switch to TabB and click one row in GridB,the textbox's value  in tab a has been changed .it shows "undefined".
xie yufei
Top achievements
Rank 1
 answered on 07 Jun 2010
0 answers
56 views
I'm with a company who delivers digital formulars. These forms usually gets embedded into our clients website by using the <script> tag.

Simple html site containing a form:

<html><body><script src="http://our-site.com/forms/form.aspx?formid=123" type="text/javascript" /></body></html> 

This works just fine for forms containing basic html/javascript. But I'm trying to develop a form containing a RadGrid. The grid shows up fine on the page, but whenever i click on a column for sorting/filtering or browse to next page in the grid, an javascript error pops up saying 'object expected'. 

The grid works fine just by itself, but I need it to work as an embedded script resource.
Can this be done? I suppose it's got to do with the client-side scripting. The same error pops up if I use a simple asp:GridView with AllowSorting=true.

Andreas
Top achievements
Rank 1
 asked on 07 Jun 2010
1 answer
90 views

I have a combobox with RadTreeview inside it.

I have Ajaxified this tree view to update Panel on the page.

Once I click item from a treeview dropdown gets locked. If I click somwhere on the page than again I am able to select Item from a tree view.

This is the code for combobox and Ajaxification

Actual combobox Markup:

  <telerik:RadComboBox ID="cboCategory" runat="server" Skin="Vista"

                    OnClientDropDownOpened="OnClientDropDownOpenedHandler" AutoPostBack="false"

                    meta:resourcekey="cboCategory"   AppendDataBoundItems="true" Width="290px" MaxHeight="110px" >

                        <ItemTemplate>

                            <telerik:RadTreeView ID="tvCategory" runat="server" Skin="Vista"

                            OnClientNodeClicking="nodeClicking" onnodeclick="tvCategory_NodeClick" EnableEmbeddedScripts="true" AutoPostBack="false" >

                            </telerik:RadTreeView>

                        </ItemTemplate>

                        <Items>

                           <telerik:RadComboBoxItem Value="0"/>

                       </Items>

                    </telerik:RadComboBox>

 

Ajax Settings:

<telerik:AjaxSetting AjaxControlID="tvCategory">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" LoadingPanelID="RadAjaxLoadingPanel1" />            

                </UpdatedControls>

        </telerik:AjaxSetting>

 

      function nodeClicking(sender, args) {

            var comboBox = $telerik.findControl(document, "cboCategory");

            var node = args.get_node()

 

            comboBox.set_text(node.get_text());

 

            comboBox.trackChanges();

            //comboBox.get_items().getItem(0).set_value(node.get_text());

            //comboBox.commitChanges();

 

            var cboItem = comboBox.get_items().getItem(0);

            cboItem.set_value(node.get_text());

            comboBox.set_text(node.get_text());

 

            comboBox.commitChanges();

 

 

            comboBox.hideDropDown();

       }

 

    function StopPropagation(e) {

        if (!e) {

            e = window.event;

        }

 

        e.cancelBubble = true;

    }

 

    function OnClientDropDownOpenedHandler(sender, eventArgs) {

        var treeName = "tvCategory";

        var tree = sender.get_items().getItem(0).findControl(treeName)

        var selectedNode = tree.get_selectedNode();

        if (selectedNode) {

            selectedNode.scrollIntoView();

        }

    }

Yana
Telerik team
 answered on 07 Jun 2010
1 answer
144 views
    else if (gridCommand == "HeaderContextMenuFilter") {  
        args.set_cancel(true); 
Hello Telerik team,

I have a RadGrid with ContextMenu and ColumnFiltering enabled.  The grid is bound using client-side ADO.Net DataService.
I have a client side OnCommand event handler that traps the HeaderContextMenuFilter event and saves the filter argument for use later.

I call args.set_cancel(true)  because I do not want the postback to fire.

However, the postback is firing anyway????  What am I missing?

Thanks
Bob
Nikolay Rusev
Telerik team
 answered on 07 Jun 2010
1 answer
141 views
Hello Telerik team,

I have a grid that is bound using a client side DataBinding service (ADO.Net data service)
One of the columns in the grid is a GridButtonColumn that has a CommandName property set to fire on the client.

The OnCommand handler for this event does a set_cancel(true) so there is no AJAX postback for this command
The OnCommand handler also return false just in case that helped my issue (it did not help)

The issue is that I see a request to my data service to retrieve the rows of currently displayed data and I do not want that network traffic hitting my server.

Why is the data service firing when a command is fired even if the command is not related to the grid's data?

Thanks
Bob
Nikolay Rusev
Telerik team
 answered on 07 Jun 2010
2 answers
149 views
Is there a way to set a default FooterText for when the grid is empty (other than writing a custom one)?  I want the footer to show "Total Amount: $0.00", but it displays "Total Amount: "

<telerik:GridBoundColumn   
   DataField="Amount"   
   DataType="System.Double" 
   HeaderText="Amount"   
   ReadOnly="True"   
   SortExpression="Amount"   
   UniqueName="Amount"   
   Aggregate="Sum"   
   ItemStyle-Wrap="false"   
   FooterAggregateFormatString="Total Amount: {0:C}">  
</telerik:GridBoundColumn> 
 

 

 

 

Adding an attribute of FooterText="Total Amount: 0" still displays "Total Amount: "

Thanks!

 

 

 

IT
Top achievements
Rank 2
 answered on 07 Jun 2010
1 answer
120 views
Hi,

Let say I have few items in my radcombobox
Item1
Item2 ---> Selected
Item3

New Input value: Item 3
On Submit -- Must select Item 3.. 
But Item2 remain selected

foreach

 

(RadComboBoxItem item in rdCboStaff.Items)

 

{

 

    if (newvalue == item.Value)

 

        item.Selected =

true;

 

}

What is missing here?

Thanks
Mihir.

Princy
Top achievements
Rank 2
 answered on 07 Jun 2010
1 answer
455 views
I'd like to programmatically change the radgrid column header (depending on user culture). In my database I have the translation of words to use for each column uniquename.
To do the translation I use the radgrid_columncreated event.

    protected void RadGridTraduzione_ColumnCreated(object sender, GridColumnCreatedEventArgs e)  
    {  
        string c = e.Column.UniqueName;  
 
        GridColumn boundColumn = e.Column as GridColumn;   
 
        if (boundColumn.UniqueName == "Maschera")  
        {  
            switch (((SessionInformation)Session["sessionData"]).IdCultura)  
            {  
                case 1:  
                    //boundColumn.HeaderText = ...;  
                    break;  
                case 2:  
                    //boundColumn.HeaderText = ...;  
                    break;  
                case 3:  
                    break;  
                case 4:  
                    break;  
            }  
        }  
    } 

I have the problem that e.Column.UniqueName is "ExpandColumn" for all my bound data columns, how can I access the .aspx specified UniqueName?
Shinu
Top achievements
Rank 2
 answered on 07 Jun 2010
3 answers
329 views
Hello,

I have a RadListBox which has a number of CheckBoxes and other controls in an ItemTemplate. Since migrating from 2009 Q3 to 2010 Q1, I've realized that the state of the CheckBoxes is no longer being maintained on PostBack.

Initially I created a small separate project to try and isolate the problem, but realised when I switch back to 2009 Q3, then the state is being maintained as expected.

Is this a known issue? Is there a work around?

Thanks,

David
Genady Sergeev
Telerik team
 answered on 07 Jun 2010
1 answer
235 views
Hi all;
I'm trying to do a charcter counter on the RadEditor control, right now the one we have does allow you to type more the the specified maxlength. once you try to post the data then it pops up the message.

Is there a way to stop user typing more then the max length? also when user tryo to paste more data is there a way to tell him that its over the limit?

Thanks
Roomi
Princy
Top achievements
Rank 2
 answered on 07 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?