Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
I have problems with the refresh of the records in Rad Grid.

I have a form into panel where I edit items of the Rad Grid, but when I Save the data the Rad Grid is not updating its content.
I tried with myRadGrid.MasterTableView.Rebind() after the data saving.

Also I trying calling a method to update the rad grid content after save the data.
Any ideas?.
Thanks in advance
private void GetRadGridData() 
    { 
        try 
        { 
            myRadGrid.ControlStyle.Reset(); 
            myRadGrid.DataSource = GetData();
            myRadGrid.DataBind(); 
        } 
        catch (Exception ex) 
        { 
            Master_Cat.HandleException(ex); 
        } 
    }
Francisco Tirado
Top achievements
Rank 1
 answered on 10 Dec 2009
1 answer
334 views
I wonder if someone could please help with the following issue I have. This is our last-roll-of-the-dice with Telerik components before we decide to ditch them in favour of our own implementations, everything is just too difficult or example code out-of-date.

Problem
We have decided to move one of our RadGrid test-cases to client-side binding using a web service. Initially starting with [WebMethod]'s in the aspx page we moved to a ASMX service to we could enforce session and reduce the data calls (as detailed in the Telerik demos here); it says:

To optimize even more the grid client-side data binding you can get both data and total items count in a single request. Example:   
...  
    [WebMethod(EnableSession = true)]  
    public Dictionary<stringobject> GetDataAndCount(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)  
    {  
        Dictionary<stringobject> data = new Dictionary<stringobject>();  
 
        data.Add("Data", GetData(startRowIndex, maximumRows, sortExpression, filterExpression));  
        data.Add("Count", (int)Session["Count"]);  
 
        return data;  
    }  
...  
 

Simple huh!? No, as web services apparently no longer support IDictionary:

The type System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutralPublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=2.0.0.0, Culture=neutralPublicKeyToken=b77a5c561934e089]] is not supported because it implements IDictionary.  

Ultimate goal
What I'm trying to (ideally) achieve here is webservice that returns data two sets of data for (a) mastertableview and (b) detailtable as one call without making secondary calls to get the data count (especially as it will relate to the VirtualItemCount). If this isn't possible I'm happy to make two seperate calls, one for the mastertableview and one for the detail view, but I do not want to make a second call for 'record count' on each of the those calls (thus making 4).

Is this possible or are we better doing something else? Your urgent thoughts on this much appreciated!

Ian
Sebastian
Telerik team
 answered on 10 Dec 2009
1 answer
159 views
I cannot figure out how to fire the selectitem event when clicking on a RadBinaryImage object that is inside a RadListView. Is this possible? I do not want to have any other visible buttons, just the RadBinaryImage must be visible inside the listview. Once the binaryimage is clicked I need to see the dataitem and do something with it. Any suggestions?
Sebastian
Telerik team
 answered on 10 Dec 2009
4 answers
126 views
Hi all.

I have a document manager that needs to display a folder containing 2000 files in the root. Furthermore, there are about 25 subfolders containing an additional 1000 files. (Currently using 2009.1.402.20). Currently only Chrome will eventually display the entire structure. All other browsers will time-out or freeze.

I've found two related threads on this:

1. An older one that states the document manager is designed for 200-300 files. It recommends to change the structure and so on. Unfortunately this is not something we can control.

2. The newer one states that since 2009.1.527.35 there is a paging option in the file/document manager, which would speed up the rendering.

I'll try to upgrade and see what happens, but my question is on the paging. I could not find any info on this in the docs. Is it turned on by default ? How can I control this feature ? Where can I find more info on this ?

 

Added a screenshot from the IE8 profiler, which identifies the dataBind function as the main cause for the delay. Apparantly this is the main issue on IE, because chrome and safari take 30 secs - 1 min, but finish without problems. Firefox shows a dialog with a script warning (very soon in my opinion), but then finishes rather quickly.


Regards, Hans
Fiko
Telerik team
 answered on 10 Dec 2009
1 answer
152 views
Hi,

is there some way to preload website in window. When after radWindow is opened no loading is needed?

Thanks!

Svetlina Anati
Telerik team
 answered on 10 Dec 2009
1 answer
120 views
Hi,

I currently have a  collection class that is basically a List<T> called Preferences.   T is a class with a property called PreferenceOrder.
I bind the collection to the radgrid on the RadGrid1_NeedDataSource like so:
protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        {          
            this.RadGrid1.DataSource = Preferences
        } 

the rad grid is defined as:
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid" 
    AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true"        
    OnPreRender="RadGrid1_PreRender"     
    OnNeedDataSource="RadGrid1_NeedDataSource"  
    OnUpdateCommand="RadGrid1_UpdateCommand" 
    OnInsertCommand="RadGrid1_InsertCommand"  
    OnDeleteCommand="RadGrid1_DeleteCommand" 
    > 
     
    <MasterTableView Width="100%" CommandItemDisplay="Top" AllowSorting="False" > 
         
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="TestingMoveItemUp" HeaderText=""
                <ItemTemplate> 
                    <asp:Image  id="imgMoveUp" class="up" ImageUrl="~/images/applications/up.gif"  
                                onclick="grd_RowMove(this, true);"  
                                AlternateText="Move Up" runat="server"></asp:Image> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
             
            <telerik:GridTemplateColumn UniqueName="TestingMoveItemDown" HeaderText=""
                <ItemTemplate> 
                    <asp:Image  id="imgMoveDown" class="down" ImageUrl="~/images/applications/down.gif" onclick="grd_RowMove(this,false);" AlternateText="Move Down" runat="server"></asp:Image> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
             
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
            </telerik:GridEditCommandColumn> 
            <telerik:GridTemplateColumn UniqueName="PreferenceOrder" HeaderText="Order" DataField="PreferenceOrder">                 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="CourseCode" HeaderText="Code" DataField="CourseCode"
            <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" /> 
        </Columns> 
         
    </MasterTableView>    
     
</telerik:RadGrid> 

I have tried a few javascripts to swap the rows that are bound to this grid, but this is not being persisted to the datasource of the grid, which is the Preferences  collection.

What can i do to perform this swap client side but have this reflected in the Preferences Collection on the unload of the page/control?

Veli
Telerik team
 answered on 10 Dec 2009
1 answer
95 views
Hi all,
I have downloaded RadControls_for_ASP.NET_AJAX_2009_3_1208_dev version and I have installed that and it worked fine but i noticed that RADcontrols are getting disappeared and I have added explicitly from choose toolbox items.When I have opened new instance toolbox doesn't show any of the RADcontrol why is it happening.Any help would be appreciated.


thanks
Ratan
Schlurk
Top achievements
Rank 2
 answered on 10 Dec 2009
2 answers
80 views
Using 2009 Q2 AJAX RadPanelBar, the panel bar from following code cannot collapse or expand.  I have read the article about putting the actual content into the child node and I did.  It seems like the HTML code rendered is exactly the same as the demo code's HTML structure, with the only difference is the rendered code is missing the "rpExpandable" in the CSS class attribute of the link element within the li element.

Please help. Thanks.

aspx Code:
                        <telerik:RadPanelBar ID="rpOrderTree" runat="server" ExpandMode="MultipleExpandedItems" DataSourceID="ObjectDataSource1" DataTextField="branch_short_desc" DataValueField="branch_code" Width="800" DataFieldID="branch_code" AllowCollapseAllItems="True" AppendDataBoundItems="True" CausesValidation="True" EnableEmbeddedSkins="False" EnableTheming="False" EnableViewState="False" RegisterWithScriptManager="True">                             
                            <ItemTemplate> 
                                <items> 
                                    <telerik:RadPanelItem text=""
                                        <itemtemplate> 
                                            <asp:RadioButtonList ID="rblOptions" runat="server" AutoPostBack="true" OnTextChanged="OptionsCommand" DataSource='<%# CreateDataSourceOptions(DataBinder.Eval(Container.DataItem, "product_code"), DataBinder.Eval(Container.DataItem, "branch_code")) %>' DataTextField="leaf_desc" DataValueField="leaf_code" Font-Size="Medium" RepeatDirection="Vertical" RepeatLayout="Flow"></asp:RadioButtonList>                                         
                                        </itemtemplate> 
                                    </telerik:RadPanelItem> 
                                </items> 
                            </ItemTemplate> 
                        </telerik:RadPanelBar> 
 

Rendered HTML by above RadPanelBar
<div id="rpOrderTree" class="RadPanelBar RadPanelBar_Default " style="width:800px;"
    <ul class="rpRootGroup"
        <li class="rpItem rpFirst"><href="#" class="rpLink"><span class="rpOut"><span class="rpText">Series</span></span></a><div class="rpTemplate"
             
                                <items> 
                                    <telerik:RadPanelItem text=""
                                        <itemtemplate> 
                                            <span id="rpOrderTree_i0_rblOptions" style="font-size:Medium;font-size: 80%;"><input id="rpOrderTree_i0_rblOptions_0" type="radio" name="rpOrderTree$i0$rblOptions" value="" onclick="javascript:setTimeout('__doPostBack(\'rpOrderTree$i0$rblOptions$0\',\'\')', 0)" /><label for="rpOrderTree_i0_rblOptions_0">Unspecified</label><br /><input id="rpOrderTree_i0_rblOptions_1" type="radio" name="rpOrderTree$i0$rblOptions" value="AAA" onclick="javascript:setTimeout('__doPostBack(\'rpOrderTree$i0$rblOptions$1\',\'\')', 0)" /><label for="rpOrderTree_i0_rblOptions_1">AAA</label><br /><input id="rpOrderTree_i0_rblOptions_2" type="radio" name="rpOrderTree$i0$rblOptions" value="BBB" onclick="javascript:setTimeout('__doPostBack(\'rpOrderTree$i0$rblOptions$2\',\'\')', 0)" /><label for="rpOrderTree_i0_rblOptions_2">BBB</label></span>                                         
                                        </itemtemplate> 
                                    </telerik:RadPanelItem> 
                                </items> 
                             
        </div></li

HTML rendered by AJAX RadPanelBar DEMO with ItemTemplate - Note the rpExpandable in class of the <a ...> element.
<div id="RadPanelBar1" class="RadPanelBar RadPanelBar_Default " style="height:280px;width:750px;"
    <!-- 2009.2.701.35 --><ul class="rpRootGroup"
        <li class="rpItem rpFirst"><href="#" class="rpLink rpExpandable"><span class="rpOut"><span class="rpText">Customer testmonials</span></span></a><div class="rpSlide"
            <ul class="rpGroup rpLevel1 "
                <li class="rpItem rpFirst rpLast"><div class="rpTemplate"
                     
                                                <div>11111</div> 
                                             
                </div></li
            </ul> 
        </div></li><li class="rpItem rpLast"><href="#" class="rpLink rpExpandable"><span class="rpOut"><span class="rpText">How to find us</span></span></a><div class="rpSlide"
            <ul class="rpGroup rpLevel1 "
                <li class="rpItem rpFirst rpLast"><div class="rpTemplate"
                     
                                                <div>22222</div> 
                                             
                </div></li
            </ul> 
        </div></li
    </ul> 

Yana
Telerik team
 answered on 10 Dec 2009
1 answer
108 views
I need to use a code like this:
Combobox with templates

But how can i populate it manually with data?
                        <telerik:RadComboBox ID="cmbVobo" runat="server"   
                            EmptyMessage="-- All --" HighlightTemplatedItems="true" 
                             AllowCustomText="true" Width="80px"  OnClientDropDownClosed="onDropDownClosingV"
                            <ItemTemplate> 
                                <div onclick="StopPropagation(event)" class="combo-item-template"
                                    <asp:CheckBox runat="server" ID="chk1" onclick="onCheckBoxClickU(this)" Checked="true"/> 
                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1"
                                        <%# Eval("Text")%> 
                                    </asp:Label> 
                                </div> 
                            </ItemTemplate> 
                            <Items> 
                                <telerik:RadComboBoxItem Text="No" Value="0" /> 
                                <telerik:RadComboBoxItem Text="Yes" Value="1" /> 
                            </Items> 
                        </telerik:RadComboBox>                                             
 

Schlurk
Top achievements
Rank 2
 answered on 10 Dec 2009
1 answer
248 views
What is the proper way to cancel selection of a row in RadGrid on a client side?

I try to use

ClientEvents-OnRowSelecting="cancel"

 

and in cancel function I call

 

eventArgs.set_cancel(

true);

 


This cancels selection, but row which was peviously selected remains not highlighted.

How can I highlight previously selected row back?

hanks,
Konstantin.
Dimo
Telerik team
 answered on 10 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?