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

I have a problem in my control to maintain scroll on postback.

 

<%

--<pages maintainScrollPositionOnPostBack="true" validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" ></pages>

 

--

 

%>

 

 

<telerik:RadPageView ID="RadPageView5" runat="server">  
                <telerik:RadAjaxPanel ID="RadAjaxPanel5" runat="server">  
                    <telerik:RadPanelBar ID="RadPanelBar5" runat="server" Skin="WebBlue" Width="100%">  
                        <Items> 
                            <telerik:RadPanelItem runat="server" Text="UPLOAD MY IMAGES" Font-Bold="true" Expanded="true">  
                                <Items> 
                                    <telerik:RadPanelItem Value="ProfilePics" runat="server">  
                                        <ItemTemplate> 
                                            <div class="accordionContent" style="display: block;">  
                                                <div class="boxContent">  
                                                    <div style="padding-left: 15px; padding-right: 15px;">  
                                                        <div class="c_left">  
                                                     ==>       <uc8:ctrlFileUpload id="ctrlFileUpload" runat="server" /> 
                                                            <%-- <uc8:ctrlUserProfile ID="ctrlUserProfilePics" runat="server" />--%> 
                                                        </div> 
                                                    </div> 
                                                    <div class="clear">  
                                                    </div> 
                                                </div> 
                                            </div> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelBar> 
                </telerik:RadAjaxPanel> 
            </telerik:RadPageView> 
        </telerik:RadMultiPage> 
Nikolay Tsenkov
Telerik team
 answered on 07 Jun 2010
3 answers
116 views
I have a treeview and a gridview.

I want to be able to drag n' drop from the treeview and insert the nodes text into the column in the gridview where the node was dropped. How can i be able to do this
Nikolay Tsenkov
Telerik team
 answered on 07 Jun 2010
3 answers
149 views
hi ,
  I have tabstrip with 2 pageview. I need to put validation controls for pages. I seperate each page with validationgroup and change validation group in OnClientTabSelected . The logic i used is from the following topic
http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/update-validation-group-rad-tabstrip.aspx

So my client function is:

 

function UpdateValidationGroup() {   
 var tabStrip = $find("<%= Radstrip1.ClientID %>");   
 var selectedTab = tabStrip.get_selectedTab();   
 if (selectedTab != null)   
 tabStrip.ValidationGroup = selectedTab.get_value();  
alert(tabStrip.ValidationGroup);  
 
}   
 
 
 


in the alert box itself i got the changed value in tabstrip. But validation happening when tab changed. If i use serverside function in onTabClick and set the group the validation works fine. What i missed when process from client side?

 

 

Veronica
Telerik team
 answered on 07 Jun 2010
1 answer
105 views
Hi,
I have almost exactly the same scenario as the demo:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

But I have a Masterpage -> Contentpage -> Usercontrol

The masterpage holds a ajaxmanager, the contentpage has a tabstrip and includes the usercontrol and the usercontrol has the grid.
I open the radwindow from inside the grid, changes some values, saves and closes the radwindow and the radgrid is refreshed.
That works!

Now:
When the grid is refreshed I want to update the tabstrip in the content page, how can this be done?

I have a event in the usercontrol which holds the value that the tabstrip will show like this:
protected void radGridImprovements_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
        { 
            IList<Task> tasks = TaskService.GetImprovements(PageInfo.CurrentObject.ID, sortedColumn, Areas, Places, string.Empty, true, SearchWord, false, 0, 0, out recordCount); 
 
            OnControlRefreshed(new ImprovementRefreshEventArgs(12345)); 
 
            radGridImprovements.DataSource = tasks; 
        } 

public event ImprovementRefreshEventHandler ControlRefreshed; 
        protected virtual void OnControlRefreshed(ImprovementRefreshEventArgs e) 
        { 
            if (ControlRefreshed != null
            { 
                ControlRefreshed(this, e); 
            } 
        }   

And in content page I link the grid and the tabstrip together:
protected void Page_Load(object sender, EventArgs e) 
        { 
            RadGrid radGridImprovements = (RadGrid)ppsImprovements.FindControl("radGridImprovements"); 
            RadAjaxManagerMaster.AjaxSettings.AddAjaxSetting(radGridImprovements, radTabStripViewsLeft, null); 
        } 

protected void Improvements_ControlRefreshed(object sender, ImprovementRefreshEventArgs e) 
        { 
            radTabStripViewsLeft.Tabs[1].Text = string.Format("Förbättringar ({0})", e.RowCount); 
 
        } 


I guess I am pretty close cause if I just click a heading to sort the grid the tabstrip is updated so the event itself works and the ajax relation between the grid and the tabstrip.

The problem is that the tabstrip wont update when the radwindow is closed and the grid is refreshed.

Regards,
Mattias




Maria Ilieva
Telerik team
 answered on 07 Jun 2010
2 answers
94 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
52 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
84 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
129 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
137 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
133 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?