Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
332 views
I am new to the Telerik controls but I have been testing them out for a couple of weeks on a proof of concept project. I am really liking the flexibility and power of this control set. But there is a bit of a learning curve.
I'm hving an issue with canceling the sort event on the grid. I basically want to trap the sort command and stop the postback but have the header images reflect the sort direction and grap the sort expression. I am doing this all client side so I will call a web service to get the data and rebind. I found an example on how to cancel a command but for some reason the postback is still happening. I am using the demo version of the Ajax/UI control version 2009.02.0701.35. Bellow is my code.

The Grid
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" GridLines="None" 
        Skin="Forest" AutoGenerateColumns="False" GroupingEnabled="False" ShowStatusBar="True" 
        Width="100%" Height="300px" EnableViewState="False">  
        <MasterTableView ClientDataKeyNames="bl_id,fl_id,rm_id" TableLayout="Fixed" EnableViewState="False" 
            AllowNaturalSort="True" AllowFilteringByColumn="false">  
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="bl_id" AllowSorting="false" 
                    HeaderText="Building" ReadOnly="True" ShowFilterIcon="False" UniqueName="bl_id">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="fl_id" AllowSorting="false" 
                    HeaderText="Floor" ReadOnly="True" ShowFilterIcon="False" UniqueName="fl_id">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="rm_id" SortExpression="rm_id" 
                    HeaderText="Room" ReadOnly="True" ShowFilterIcon="False" UniqueName="rm_id">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="name" SortExpression="name" 
                    HeaderText="Name" ReadOnly="True" ShowFilterIcon="False" UniqueName="name">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="use" SortExpression="rm_use" 
                    HeaderText="Use" ReadOnly="True" ShowFilterIcon="False" UniqueName="use">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="rmtype" SortExpression="rmtype" 
                    HeaderText="Type" ReadOnly="True" ShowFilterIcon="False" UniqueName="rmtype">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="capacity" SortExpression="capacity" 
                    HeaderText="Capacity" ReadOnly="True" ShowFilterIcon="False" UniqueName="capacity">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn AllowFiltering="False" DataField="area" SortExpression="rm.area" 
                    HeaderText="Area" ReadOnly="True" ShowFilterIcon="False" UniqueName="area">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <DataBinding CountPropertyName="" MaximumRowsParameterName=""   
                StartRowIndexParameterName="" SelectMethod="GetRoomList"   
                Location="services/SjeccdSpaceWebService.asmx" FilterParameterName="filter"   
                FilterParameterType="Linq" SortParameterName="sort" SortParameterType="Linq">  
            </DataBinding> 
            <Selecting EnableDragToSelectRows="False" AllowRowSelect="True" /> 
            <ClientEvents OnCommand="CheckStuff" /> 
            <Scrolling AllowScroll="True" UseStaticHeaders="True" EnableVirtualScrollPaging="false" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

The script
<script id="sample" language="javascript" type="text/javascript">  
    function CheckStuff(sender, args) {  
         //cancel the default command to prevent postback/ajax request  
        //var sortExpressions = sender.get_masterTableView().get_sortExpressions();  
        if (args.get_commandName() == 'Sort'){  
            args.set_cancel(true);  
            //get data and update grid;  
 
        } 
        alert(args.get_cancel()); //+ sortExpressions.toString());  
    }  
 
 
</script> 

After I click the column header the sort command is trapped. I get a message box wiith 'true' and I select OK. Then the grid updates with the new sort. Does this have something to do with the data binding section of the grid control? I have about 8 hours into this and I have tried a number of diffent options. I am just stuck. Any help or best practices would be appreciated.

Thanks,
Craig
Veli
Telerik team
 answered on 25 Nov 2011
1 answer
67 views
I have just installed the latest demo of telerik rad controls and configured my project using right click configure telerik products and the ajax functionality of all controls does not work they appear and render fine but do not for example the datepicker does not drop down and none of the editor buttons fuction I have included a paste bin of my web.config to see what is wrong and also include an example of how I am implmenting 



web.config
http://pastebin.com/QBgBz4Hs






this is an example of my implementation


http://pastebin.com/pjarxYyR
Rumen
Telerik team
 answered on 25 Nov 2011
1 answer
42 views
I downloaded the trail of rad controls and they are not rendering they are being displayed as bullet points. and ajax funcionallity is not working so i re created the full project and a sperate aspx file and still the same issue
Iana Tsolova
Telerik team
 answered on 25 Nov 2011
1 answer
89 views
Hi,

I have a radeditor control inside a div with style="display:none"  (because i use a jquery dialog  plugin - jQuery UI 1.8.9 - to render that div in a popup) and when i show the div, the control not allow the text insert.

This behavior does not always occur, but when occurs the console of firebug shows the following error:

_b2 is null
    addExternalHandler()Script...e6098e2 (line 697)
           _b2 = null
          _b3 = "keydown"
          _b4 = function()
          _registerGlobalBodyEventHandlers()Script...e6098e2 (line 3487)
          _PopupController()Script...e6098e2 (line 3456)
          createEditorPopupController()Script...e6098e2 (line 3547)
[Break On This Error] if(_b2.addEventListener){

Other informations:
- Controls version: Telerik.Web.UI, Version=2009.1.527.20
- The radeditor is inside a user control in a sharepoint 2010 page layout
Rumen
Telerik team
 answered on 25 Nov 2011
1 answer
75 views
Hello,

I was working with the Q2 version of AJAX and every thing was fine.

And yesterday I have updated my version to the Q3. And one page of my website doesn't work anymore... I have a message saying:

Can't find the column [MyDevis.Montant].

So I came back to the Q2 version, and every thing work perfectly.


Do you have any ideas?


Thank You

Jean-Yves
Radoslav
Telerik team
 answered on 25 Nov 2011
1 answer
43 views
I have a problem with RadGrid in "SelfHierarchyMode".

My settings in aspx:
<telerik:RadGrid runat="server" ID="rgArtikelSuche" AllowSorting="false" AllowFilteringByColumn="false"
AutoGenerateColumns="false" AllowMultiRowSelection="true" Visible="false" OnNeedDataSource="rgArtikelSuche_NeedDataSource" >
<ClientSettings AllowKeyboardNavigation="true" AllowExpandCollapse="true">
<Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
</ClientSettings>
<MasterTableView HierarchyLoadMode="Client" HierarchyDefaultExpanded="true"
DataKeyNames="Key, GroupKey">
<SelfHierarchySettings ParentKeyName="Parent" KeyName="GroupKey" />
</MasterTableView>
</telerik:RadGrid>

My datasource look like:

Key    GroupKey    Parent    Description
1        A1                null         A1
2        B1                A1          B1
3        B2                A1          B2
4        A2                null         A2
5        B3                A2          B3

The Elements B1, B2 and B3 are shown on ClientSide under their parent Element AND direct under the root, so they were shown twice.

WHY????

Maria Ilieva
Telerik team
 answered on 25 Nov 2011
1 answer
30 views
Not sure what the issue is, there are no js errors, no code errors, everything compiles.

One of the tabs does not work after the upgrade.   Once I go to that tab, then I can't go to any other tab.   Again, no errors of any kind.   All we did was upgrade.
Helen
Telerik team
 answered on 25 Nov 2011
3 answers
171 views
Hi,

I have a problem while validating the start time and end time, if I keep my record but I make the mistake of "start time must be Before end time" when I change my dates to another day in the RadScheduler, someone can help me?
Plamen
Telerik team
 answered on 25 Nov 2011
1 answer
61 views

I am using RadCombo box for my Asp.net Application.

On the page load data is being bound to the combobox. Now there is an option to edit the data in the Combo box by clicking on a link that is beside the combobox which brings a popup window where we edit the data and Update. On Updating the value the popup window is closed thereby refreshing the Combobox (client side).

For that i am using the following code.

        cboCases.clearItems();

        cboCases.requestItems(sel, false); //Here value of sel is the selected index’s value.

 

After the request_Items fires the sever side event is called to bind the combobox.

The server side code is

cboCases.DataSource = listObjects;

cboCases.DataBind();

cboCases.SelectedIndex = int.Parse(sel); //sel is the values passed from Request_Items

 

My Issue is that even though we are setting the selected index value, what is being reflected in the UI is the same old value.But once we change the index of the combobox manually from the UI the data is the updated value.

Ivana
Telerik team
 answered on 25 Nov 2011
3 answers
249 views
Hi, I have a jquery modal popup on my page.

I can open it fine with a regular asp.net button
<asp:Button ID="btnQuery" OnClientClick="showDialog('newRecord');return false;" runat="server" Text="Open Modal" />

but i cannot open it using the RadButton
<telerik:RadButton ID="btnOpen" runat="server" Text="Open Modal" onclientclicked="showDialog('newRecord');return false;"></telerik:RadButton>

I am not sure what I am doing wrong here. 
Thanks for any assistance
Stuart Hemming
Top achievements
Rank 2
 answered on 25 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?