Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
37 views
Hi,

I am using the Radgrid's client-Events -> Oncommand  handler to add some validations  to a button before it is submitted, it works fine and was able to cancel the event when a criteria is not met, but for some buttons like the "Delete" button where I didnt add any validations,  the itemindex that is passed on my server side  OnItemCommand  event handler is always zero. Is this supposed to be the case? How do I pass the itemindex argument?  I tried to do a firecommand (args.get_commandName(), args.get_commandargment()) but it returns an out of memory exception. Please see below code that I have for the raisecommand


function raisecommand(sender,args){
if (args.get_commandName=="ViewDetails"){
<<some validations here>>
args.set_cancel(true);
        }

}


Thanks
Princy
Top achievements
Rank 2
 answered on 23 Sep 2010
1 answer
86 views
I'm using a RadGrid with a LinqDataSource, there is a money DataBase column, in the Grid, it is a GridNumericColumn, with NumericType="Currency".

When I try to filter values with commas, the commas (decimal separator) are simply ignored, and after the post, the value appears in the filter as the comma didnt existed.

I've implemented the ItemCommand event, and got the RadNumericTextBox, it's Value, and Text is shown already wrong, so I tried to divide it by 100, to correct the value, in this case, nothing is done, and the filter stop working.

My Culture-Info is pt-BR. I have changed it to en-US, and it works ok (for dots, as decimal separators), also my workaround in the ItemCommand works for en culture...

Is it a known issue? What can I do to get around this behavior?

Thanks in advance, and congratulations for the great work!

Fernando Mondego
Daniel
Telerik team
 answered on 23 Sep 2010
4 answers
145 views
Hi All. Sorry if this has been answered previously but i couldn't find any related posts.

I am trying to design a grid with the "Add a New Record" option in the header and footer (CommandItemDisplay="TopAndBottom")  for an InPlace insert. It works great if i put a command column in the grid. However I would like to only show the insert and cancel commands in the row that is to be inserted. The MasterTableView has the "AllowAutomaticInserts="true" property set, none of the other automatic properties are set. I do not want an edit option on all the other existing rows in the grid. Can someone point me in the right direction to accomplish this?

Thanks for your help.
Scott
Pavlina
Telerik team
 answered on 23 Sep 2010
2 answers
96 views
Hi
I am using the same method for binding data returned from json to the client side.
Please note that i am using this Grid in asp.net MVC 1.0. Script Manager and all other telerik objects are loading properly and i am receiving this JSON from a method which returns JSON. I hope that the given code is sufficient, however i can provide you MVC code, if required:
I am using the following code:

$.ajax({
            type: "POST",
            url: getAppPath() + "Account.aspx/UsersList",
            data: { State: StateVal, County: CountyVal, District: DistrictVal, School: SchoolVal, sUserName: userName, sUserEmail: email, Status: StatusVal },
            success: function(results) {
                //alert(results);
                updateGrid(results);
            },
            error: function(msg) {
                alert("The following error occurred: " + msg.status + ": " + msg.statusText);
            }

        });

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
           

            function updateGrid(result) {
                var tableView = $find("<%= grdUsers.ClientID %>").get_masterTableView();
                tableView.set_dataSource(result);
                tableView.dataBind();
            }

            function RadGrid1_Command(sender, args) {
                
                var a = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                args.set_cancel(true);
                alert("page command");

            }


        
    
        </script>

    </telerik:RadCodeBlock>

When i call the updateGrid method
                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
the following line returns null. However if i only use this line, it will find the Grid.
var a = $find("<%= RadGrid1.ClientID %>")
Please let me know how to handle it and later assign the json to grid in order to populate it.
Thanks.
Radoslav
Telerik team
 answered on 23 Sep 2010
2 answers
72 views
I am using RadEditor in my page to perform add and edit operations, it works like a charm in IE7 and IE8, but i am facing some problems in IE6.
when the page loads the control looks just fine but after postback on any control on the page (i.e dropdown or something) the editor control stretches.
please check the attached image just to be clear as to how the editor looks on postback and in normal view.
would be grateful if anyone could provide me with a workaround...
Senthil ramna
Top achievements
Rank 1
 answered on 23 Sep 2010
1 answer
59 views
Hi I'm new but I very intersting in the Editor http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
I have a questio about this control.

It is possible I add a custom toolbar, maybe I need a toolbar with field become to store procedure or I need add more functionability so it is possible?

It is difficult implement this control in my web site?
Shinu
Top achievements
Rank 2
 answered on 23 Sep 2010
1 answer
84 views
Hello, i have 2 questions and they are related:
1. If you have a column that is bound to another table, and you go to edit a record, is there a way to resize the radcombobox that is provided by default?
2. If replacing the default with edititemtemplate, what is the proper way to bind that radcombobox to the current record value? setting text property doesn't work because its bound to the datasource later and overwrites your selection.

Thanks,
Viktor.
Shinu
Top achievements
Rank 2
 answered on 23 Sep 2010
2 answers
132 views
Hi,

I am using radgrid with nested detail view.
whenever user click the row, it shows detail info for particular row in the form of RadListViews.
The RadListViews are inside RadTabStrip, now when i try to Eport to PDF, it throughs exception

Telerik.Web.Apoc.ApocException: internal-destination or external-destination must be specified in basic-link


When i removed the RadTabStrip from NestedViewTemplate, i am able to export to PDF, do we need special setting if i am using RadTabStrip.

Note: telerik Version=2010.1.309.35

The code is as follows:


<NestedViewTemplate>
                        <asp:Label ID="Label1" runat="server" Style="display: none;" Text='<%#Eval("ID") %>'></asp:Label>
                        <asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap">
                            <div class="contactWrap">
                                <telerik:RadTabStrip  EnableViewState="true" runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="1">
                                    <Tabs>
                                        <telerik:RadTab runat="server" Text="Employee Detail" PageViewID="PageView3">
                                        </telerik:RadTab>                                 
                                     </Tabs>
                                    
                                </telerik:RadTabStrip>
                                <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="1" RenderSelectedPageOnly=  "false">
                                   
                                      <telerik:RadPageView runat="server" ID="PageView3">
                                           <div class="contactWrap">
                                                <telerik:RadListView ID="RadListView2" runat="server" DataSourceID="ObjectDataSource1"
                                                         ItemPlaceholderID="EmptyDataHolder">
                                               </telerik:RadListView>
                                          </Div>
                                      </telerik:RadPageView>

                                </telerik:RadMultiPage>
                            </div>
                        </asp:Panel>
                </NestedViewTemplate>
naimish
Top achievements
Rank 1
 answered on 23 Sep 2010
2 answers
174 views
Hi,

I try to set up a RadGrid with a delete-icon to delete a record. When the delete-button in the GridButtonColumn is from type LinkButton it works fine. But when I change it to an ImageButton to show the delete-icon, I get the following error when deleting a record:

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.


The error appears after the confirmationdialog. I tried the Classic confirmationdialog, but it didn't help.

Any ideas?

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdPlaylistItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPlaylistItems" LoadingPanelID="RadAjaxManagerLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadWindowManager ID="RadWindowManager1" Skin="Windows7" runat="server">
    </telerik:RadWindowManager>
    <asp:Label ID="lblTitlePlaylistItems" runat="server"><strong>Playlist Items</strong></asp:Label>
    <telerik:RadGrid ID="grdPlaylistItems" runat="server">
        <MasterTableView TableLayout="Fixed">
            <Columns>
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                    ButtonType="ImageButton" ImageUrl="../images/icons/remove.png" HeaderStyle-Width="30px"
                    ConfirmDialogType="RadWindow" ConfirmDialogHeight="100px" ConfirmText="Are you sure you want to delete this item?"
                    ConfirmTitle="Delete playlist item">
                </telerik:GridButtonColumn>
                <telerik:GridTemplateColumn HeaderStyle-Width="70px" HeaderText="Thumbnail">
                    <ItemTemplate>
                        <asp:Image ID="imgThumbnail" runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="ItemName" HeaderText="Name" HeaderStyle-Width="200px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PlaylistItemType" HeaderText="Type" HeaderStyle-Width="70px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ItemDuration" HeaderText="Duration" HeaderStyle-Width="120px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SortOrder" HeaderText="SortOrder" UniqueName="SortOrder"
                    HeaderStyle-Width="45px" Visible="true">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    </form>
</body>
Ilona
Top achievements
Rank 1
 answered on 23 Sep 2010
1 answer
51 views
I'm hoping this is an easy fix and just something I've overlooked.  I have a horizontal menu with vertical slides for children and RightExpand slides for grandchildren.  The child nodes display an arrow if they have children when hovered.  This works great.  However, when the mouse is moved to the grandchildren, the arrow disappears.  Is there any way to get it to stay there so long as that child is expanded?  Again, I'm sure this is something I'm overlooking.  Here's some code:

This is what I have pertaining to the arrow:  I can include more code if needed.  Thank you.
.RadMenu_NavBlue .rmGroup .rmLink:hover .rmExpandRight,
.RadMenu_NavBlue .rmGroup .rmFocused .rmExpandRight,
.RadMenu_NavBlue .rmGroup .rmExpanded .rmExpandRight,
.RadMenu_NavBlue .rmGroup .rmSelected .rmExpandRight
{
    background:url(menu/bluearrow.gif) no-repeat right;
}
Yana
Telerik team
 answered on 23 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?