Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
145 views
I'm seeing an issue with a RadGrid using client-side databinding where if the user changes the page size using the dropdown in the paging footer, the additional rows don't get some of the column settings (like horizontal alignment, CSS class, etc) that they should.

The grid is set up like so:
<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false"
    Width="100%" GridLines="None" PageSize="5" AllowFilteringByColumn="true" AllowPaging="true"
    AllowSorting="true">
    <MasterTableView EnableViewState="False" EnableNoRecordsTemplate="true" IsFilterItemExpanded="false">
        <NoRecordsTemplate>
            There are no available records.
        </NoRecordsTemplate>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridHyperLinkColumn SortExpression="Name" ItemStyle-CssClass="gridLink" ItemStyle-Wrap="true" HeaderText="Description"
                UniqueName="Name" DataTextField="Name" FilterControlWidth="55px" CurrentFilterFunction="Contains">
            </telerik:GridHyperLinkColumn>
            <telerik:GridDateTimeColumn AllowFiltering="true" AllowSorting="true"
                ItemStyle-Wrap="false" DataField="DueDate" DataFormatString="{0:M/d/yyyy}" HeaderText="Scheduled"
                UniqueName="DueDate" ItemStyle-Width="85" HeaderStyle-HorizontalAlign="Right"
                ItemStyle-HorizontalAlign="Right" CurrentFilterFunction="GreaterThanOrEqualTo">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn AllowFiltering="true" AllowSorting="true"
                ItemStyle-Wrap="false" DataField="DoneDate" DataFormatString="{0:M/d/yyyy}" HeaderText="Done"
                UniqueName="DoneDate" ItemStyle-Width="55" HeaderStyle-HorizontalAlign="Right"
                ItemStyle-HorizontalAlign="Right" CurrentFilterFunction="GreaterThanOrEqualTo">
            </telerik:GridDateTimeColumn>
        </Columns>
    </MasterTableView>
    <PagerStyle Mode="NextPrevAndNumeric" />
    <ClientSettings>
        <ClientEvents 
            OnDataBinding="RadGrid1_OnDataBinding" 
            OnDataBound="RadGrid1_OnDataBound" 
            OnRowDataBound="RadGrid1_OnRowDataBound"
            OnDataBindingFailed="RadGrid1_OnDataBindingFailed" />
        <DataBinding Location="~/Services/RadGrid1Service.svc" SelectMethod="GetRadGrid1Data" SortParameterType="String" FilterParameterType="String">
        </DataBinding>
    </ClientSettings>
</telerik:RadGrid>

I have attached a screenshot showing the problem (rows 6 and on do not have the Scheduled date right-aligned; they also do not get the gridLink CSS class on the Description column).

Is this a known issue/is there a workaround? I've looked at the OnRowDataBound method and it's not doing anything that should interfere with this as far as I know -- all it does is conditionally add a CSS class (using jQuery.addClass) to the Scheduled column if the date is in the past.




 
Vsoni
Top achievements
Rank 1
 answered on 11 Nov 2013
1 answer
148 views
Hi,
In my telerik grid AggregateFiled,I have bind Text box.
This works fine but when i click  on any button on page it shows me java script error message .
i have attached Image for more details.
if i replace Textbox with Lable its working fine.In my case i want to add text box to aggregate field and end user can edit the value and need to save the data.
here is my code.

By Code : Iam getting Error1.jpg
 TelerikPivotGridHelper.PivotGridAggregateFiled(RadGrid1, "", "LoadHours", "LoadHours", 60, "{0:F2}", "{0:F2}", TelerikControlType.TextBox, "lblAmount");

 #region PivotGridAggregateFiled
    public static void PivotGridAggregateFiled(RadPivotGrid grid, String headertext, String datafield, String UniqueName, int Width, String DataFormatString, String totalformatString, TelerikControlType Columntype, String contolID)
    {
        PivotGridAggregateField aggregateField = new PivotGridAggregateField();
        if (Columntype != TelerikControlType.None)
        {
            aggregateField.CellTemplate = new MyTemplate(datafield, Columntype.ToString(), Width - 2, contolID);
        }
        aggregateField.DataField = datafield;
        aggregateField.UniqueName = UniqueName;
        aggregateField.CellStyle.Width = Width;
        aggregateField.DataFormatString = DataFormatString;
        aggregateField.TotalFormatString = totalformatString;
        aggregateField.Caption = headertext;
        grid.Fields.Add(aggregateField);

    }
    #endregion



 public void txtbox1_DataBinding(object sender, EventArgs e)
        {
            TextBox txtbox1 = (TextBox)sender;
            PivotGridDataCell container = (PivotGridDataCell)txtbox1.NamingContainer;
            if (container.DataItem != null)
            {
                txtbox1.Text = container.DataItem.ToString();
            }
            else
            {
                txtbox1.Text = "0";
            }
        }

by Design : Iam getting Error2.jpg
 <telerik:PivotGridAggregateField DataField="LoadHours"  CellStyle-Width="60px">
                <celltemplate >   
                <asp:TextBox ID='txtloadhours' runat="server" Width="46" Text='<%# Container.DataItem%>' ></asp:TextBox>
                <%--  <asp:TextBox ID='txtloadhours' runat="server" Width="46" Text='<%# ProcessMyDataItem(Container.DataItem) %>' ></asp:TextBox>--%>

 
                  </celltemplate>         
                </telerik:PivotGridAggregateField>   
Syed
Top achievements
Rank 1
 answered on 11 Nov 2013
13 answers
1.5K+ views
Hi. I am using IE8 and I get the above JavaScript error in a couple of Telerik Client Side Event handlers. I don't understand why?!

First example, in RadTreeView control:

<telerik:RadTreeView ID="treeView" runat="server" Skin="Vista" OnClientContextMenuItemClicked="onClientContextMenuItemClicking"
    <ContextMenus> 
        <telerik:RadTreeViewContextMenu ID="FolderContextMenu" runat="server" Skin="Vista"
            <Items> 
                <telerik:RadMenuItem Value="FolderDelete" Text="Delete Folder" PostBack="true"></telerik:RadMenuItem> 
            </Items> 
        </telerik:RadTreeViewContextMenu> 
    </ContextMenus> 
</telerik:RadTreeView> 

Event handler
        function onClientContextMenuItemClicking(sender, args) { 
            var menuItem = args.get_menuItem(); 
            var treeNode = args.get_node(); 
            menuItem.get_menu().hide(); 
 
            switch (menuItem.get_value()) { 
                case "FolderDelete":                    
                    args.set_cancel(true); 
                    break
            } 
        } 

...would throw and error in the line where it says: "args.set_cancel(true);"


Same I get in your example of function ShowPopupAbove(sender, eventArgs) - eventArgs.set_cancel(true); just don't work for me!!!




Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30618; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Tue, 18 Aug 2009 16:00:09 UTC

Message: Object doesn't support this property or method
Line: 183
Char: 21
Code: 0



Ramanathan
Top achievements
Rank 1
 answered on 10 Nov 2013
2 answers
168 views
Telerik support

I am new to this control and about to use this to upload image files in my website. I tried the below code
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadAsyncUpload runat="server" ID="radasyncUpload1" MultipleFileSelection="Automatic" AllowedFileExtensions=".jpg" TargetFolder="~/UploadImages/" />
<telerik:RadButton ID="rbtnUpload" runat="server" Text="Upload"></telerik:RadButton>

Some times when I run the page, IE display a popup with an error telling that the page cannot be found and In Firefox, the upload will start and it wont complete. I can see the yellow button blinking continuously. Suppose if I cancel that file, rest of the files are successfully uploaded. I am having the 2013.2.522 web.ui.dll

Thanks
Freddy
Freddy
Top achievements
Rank 1
 answered on 09 Nov 2013
1 answer
198 views
Hello I am trying to hide/eliminate the image 1 of one from the ligtbox
thank you


<telerik:RadLightBox ID="FeedbackLightBox" runat="server"  Modal="true">
        <ClientSettings>
            <AnimationSettings HideAnimation="Resize" NextAnimation="Fade" PrevAnimation="Fade"  ShowAnimation="Resize" />
        </ClientSettings>
        <Items>
            <telerik:RadLightBoxItem>
                <ItemTemplate>
                    <div>
                        <br />
                        <h2>
                        Email Address</h2>
                        <img style="" alt="" src="<%= ResolveUrl("~/images/popup_underline.gif") %>" width="80%"><br />
                        <br />
                        The email address you enter will be used as your unique login ID. You will also
                        receive all Portal notifications to this email address.<br />
                        <br />
                        If this email address is in use, please verify that another user is not already
                        registered with this email address.
                        <br />
                        <br />
                        If this is your email address and you have forgotten the password, please click <a
                            href="<%= ResolveUrl("~/Profile/ResetPassword.aspx") %>">here</a> to go to the
                        Reset Password page.
                        <br />
                        <br />
                    </div>
                </ItemTemplate>
            </telerik:RadLightBoxItem>
        </Items>
    </telerik:RadLightBox>

<a href="#" onclick=" OpenCodeLightBox();"  class="left-field poplight"></a>

function OpenCodeLightBox() {
            var lightBox = $find('<%= FeedbackLightBox.ClientID %>');
            lightBox.show();
        }


 
Gary
Top achievements
Rank 1
 answered on 08 Nov 2013
3 answers
278 views
Sorry, AllowScroll="true" works in the new version 2013.3.1015.45
But the columns are not centered......

2013.2.717.45.png: Centered perfect and scrolling works
2013.3.1015.45.png: Not centered and scrolling doesn't works


Pavlina
Telerik team
 answered on 08 Nov 2013
3 answers
357 views

hi,

i have a usercontrol with radgrid that have a RadTabStrip in its nestedviewtemplet and in tab there is usercontrols and each control has it's 

i am using this code to update radgrids in all controls even the parent control

  
Dim ParentPageAjaxManager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
ParentPageAjaxManager.AjaxSettings.AddAjaxSetting(ParentPageAjaxManager,
Me.StudentsMasterProgramsListRadGrid)
 AddHandler ParentPageAjaxManager.AjaxRequest, AddressOf ParentPageAjaxManager_AjaxRequest

when compile i get this error "Collection was modified; enumeration operation may not execute."

so i tried to remove this line 

ParentPageAjaxManager.AjaxSettings.AddAjaxSetting(ParentPageAjaxManager,
                        Me.StudentsMasterProgramsListRadGrid)


from all child controls and leave it in the parent control and it worked!!

and rad grids in controls in nestedtemplete update like i want 

but the problem when i want to use those child controls ((not in a rad grid))) then radgrids in child controls won't update by ajaxmanger .


could someone please explain this to me and gave me a solution .
 

Angel Petrov
Telerik team
 answered on 08 Nov 2013
5 answers
450 views
Hi teleirk,
    How to multiple select node without pressing ctrl key? I have a secnario, when user select a node, add it value to a textbox, but I don't want to multiple select with any keyboard, only use mouse, how to implement it?
    question 2 : Is there any client method to directly get all the selected nodes?
    suggestion: Why not add a property like ExplandDeeps, in some scenario, we usually need to expland 1 or 2 level automatic of the tree after the data was binded
Boyan Dimitrov
Telerik team
 answered on 08 Nov 2013
12 answers
244 views
I find the OrgChart control really interesting and would like to use the control to show and modify the organization of various customers. However, I find that the contruction of the javascript takes a substantial amount of time when the organization consists of more than a few hundreds/thousand units. I understand that this is caused by the fact that all units from the datasource is loaded by the control and not just the once that is shown on the screen.

Luckily, the 2012Q3 release contain the webservice option as demoed at http://demos.telerik.com/aspnet-ajax/orgchart/examples/populatingwithdata/webservicebinding/defaultcs.aspx. This really seems like the way for us to go. However, we haven't succeeded using the webservice functionality, and we are not able to connect the control to the two WCF services that we have created. We are unsure how to use the two WebServiceBindings collection and have tried with both various URI's and labels to services referenced for RadOrgChart2.WebServiceBindings.GroupEnabled.GroupItemServiceSettings.Path. The two services are running when the aspx file is lanched but they aren't called when hitting one of the two extend buttons. Using Fiddler we get a http code 400 or 404 depending on our current setting. We have not been able to find any helpful documentation or forum tips that could help us out.

Will it be possible to get a working VS solution included the aspx page and the two services from the demo-page (preferable C#)? Or alternatively, some additional information on how to setup the WCF services and customy the OrgChart control to connect to the services?

Thanks.
Plamen
Telerik team
 answered on 08 Nov 2013
3 answers
174 views
(1) In a PivotGrid, is it possible to have the values sorted when filtering? If we display a list of values, from which to select, the values are unordered. If the number of values is lengthy, it's very cumbersome for the users to scroll through and find specific values since they have to look at every one.

Is it possible to have the list of potential values returned in sorted order?

(2) Why is it that the 'Label Filter' and 'Value Filter' only show up for certain columns? The user would like to use a substring search on one column, but the filtering options don't show anything other than the checkbox list.
Kostadin
Telerik team
 answered on 08 Nov 2013
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?