Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
151 views
I'm using a Scheduler Web Part against Exchange server as it's data source. All calendar events in the web part seem to be presenting in UTC 0 time zone, rather than the local time zone, and I cannot find a way to change this setting.

I did read some API documentation that states in the absence of explicitly setting a time zone for the control, it will default to UTC 0 which is exactly what appears to be happening, however, there is not a settable web part property in the GUI in SharePoint for changing the Time Zone, nor can I figure out how to code it manually.

I've verified the regional settings on my SharePoint server are all correct for our local time.

Any help appreciated!
Bob
Boyan Dimitrov
Telerik team
 answered on 26 Sep 2013
3 answers
469 views
Hello,

I've come across a strange issue I can't seem to get my head around:

I currently have a Dynamic TabStrip/MultiPageView setup going, which dynamically load controls as tabs are added. I have been replacing the regular ASP TextBox controls with RadTextBox controls, however I have noticed that upon changing tabs back and forth, all information in the RadTextBox controls are erased, while the ASP TextBox controls all stay filled in. I'm curious as to what the difference with the TextBoxes are that might be causing this.

It's a little tricky to get workable code to reproduce this, but from what I can tell changes are lost on any postbacks (placing a RadTextBox outside my tabstrip to test also causes information to be lost)

While I would normally assume this is all due to my lack of understanding of ASP page cycles, the fact that I get the expected behavior with an ASP box but not with a RAD box is confusing. Any help in the right direction or even what I can do to try and isolate the problem would be greatly appreciated.

Thank you.

EDIT:

I've narrowed this down to find that Loading a control seems to break the persistence (although it doesn't seem to matter whether the text boxes are in the control our outside the tabstrip completely - the same thing happens). My understanding is that the ViewState/Postback shouldn't affect text boxes (and they don't affect the regular ones) as per this article here. So on the loading of a control, what's destroying the changes in the RadTextBox, but not destroying the changes in the ASP TextBox?
Vasil
Telerik team
 answered on 26 Sep 2013
1 answer
141 views
Hi,

Using the editor both within our product and also on your online demos, if you view the page using IE10 in compatibility view some of the icons on the toolbars fail to load. If this is fine first time, try changing the skin to something else like Default. If you switch out of compatibility view, this resolves itself. By default IE is in compatibility view when viewing a website on a local intranet and this is causing us some issues.

Can you explain why this is happening and why this is only affecting some icons? We have tried using a meta tag to force IE10 out of compatibility view but this have no effect any more. Do you have a solution?

Thanks

Rob
Bozhidar
Telerik team
 answered on 26 Sep 2013
3 answers
269 views
Hi,
i bind my RadGrid to an EntityDataSource.
First i want fill it with a where statement.
In T-SQL like so:  Select Status,Cti,CreatedDate from Table1 where CreatedUser = @LoggedInUser
This works fine. But when i want to filter some columns i get this error
AutoGenerateWhereClause can not be 'true', if Where is defined
My EntityDatasource look like so
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=TestEntities"
    DefaultContainerName="TestEntities" EntitySetName="Table1" OrderBy="it.CreatedDate DESC"
    Select="it.[Status], it.[CreatedDate], it.[CTI]"  AutoGenerateWhereClause="True"
    Where="it.CreatedUser = @LoggedInUser">
    <WhereParameters>
        <asp:Parameter DefaultValue="Test\User1" Name="CreatedUser" DbType="String" />
    </WhereParameters>
</asp:EntityDataSource>
How can i achive this. Fill Grid with where statement and also filtering should work
Thanks
Yunuen Sanchez
Top achievements
Rank 1
 answered on 26 Sep 2013
1 answer
149 views

as refer to another post for adding a checkbox in groupheader,

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/radgrid-checkbox-for-specific-group.aspx

i had implemented the code from

https://github.com/telerik/aspnet-sdk/tree/master/Grid/GroupingAndSelection

it works fine that it can select all child checkbox when click groupheader checkbox.
but i found that the groupheader checkbox cannot deselect after click. i had gone through the code many time but cannot solve it.

Thanks.

<script type="text/javascript" language="javascript" >
    function Clicked(strKey) {
        alert(strKey);
    }
 
 
    var tree = {
        isRoot: true
    },
           treePositionsCache = {};
 
    // The idea is to build a tree in which every node has a relation to it's parent group item
    function GridCreated(sender, args) {
        var rows = sender.get_masterTableView().get_element().rows,
               currentRow,
               currentNode = tree,
               shouldGoUpOneLevel = false,
               groupLevel = 1;
        //Builds the tree
        for (var i = 0; i < rows.length; i++) {
            currentRow = rows[i];
            if (currentRow.parentNode.tagName.toLowerCase() === "tbody") {
                //The row is a group header row
                if (currentRow.className.indexOf("rgGroupHeader") !== -1) {
                    //Finds the parent node of the current node
                    if (shouldGoUpOneLevel) {
                        for (var j = 0; j < groupLevel - $telerik.getElementsByClassName(currentRow, "rgGroupCol").length + 1; j++) {
                            currentNode = currentNode.parent;
                        }
                    }
                    //Determines the group level
                    groupLevel = $telerik.getElementsByClassName(currentRow, "rgGroupCol").length;
                    currentNode.numberOfItems++;
                    currentNode = currentNode[i] = {
                        //Sets the parent reference
                        parent: currentNode,
                        //Sets the checkbox reference
                        checkbox: $telerik.findElement(currentRow, "ClientSelectColumnSelectCheckBox") ||
                               $telerik.findElement(currentRow, "GroupHeaderCheckBox"),
                        numberOfItems: 0,
                        numberOfCheckedItems: 0
                    };
                } else {
                    // The row is a GridDataItem
                    shouldGoUpOneLevel = true;
                    // Increase the number of item that the parent has.
                    currentNode.numberOfItems++;
                    //If the item is selected mark it as one.
                    if (currentRow.className.indexOf("rgSelectedRow") !== -1) {
                        currentNode.numberOfCheckedItems++;
                    }
                }
                //Add the node to the tree
                treePositionsCache[i] = currentNode;
            }
        }
    }
 
 
    function RowSelected(sender, args) {
        PerformSelect(treePositionsCache[$get(args.get_id()).rowIndex]);
    }
 
    function RowDeselected(sender, args) {
        PerformDeselect(treePositionsCache[$get(args.get_id()).rowIndex], true);
    }
 
    //Recursively traverse the tree and deselect the check boxes
    function PerformDeselect(node, firstCall) {
        if (--node.numberOfCheckedItems !== node.numberOfItems && !node.isRoot && node.checkbox.checked) {
            node.checkbox.checked = false;
            PerformDeselect(node.parent, false);
        }
    }
 
    //Recursively traverse the tree and select the check boxes
    function PerformSelect(node) {
        if (++node.numberOfCheckedItems === node.numberOfItems) {
            node.checkbox.checked = true;
            PerformSelect(node.parent);
        }
    }
 
    //Called when a group header check box is checked or unchecked
    function GroupToggleSelection(sender) {
        //Finds the row
        var row = Telerik.Web.UI.Grid.GetFirstParentByTagName(sender, "tr"),
        //Obtains the row index
               rowIndex = row.rowIndex,
        //Determines the group level
               level = $telerik.getElementsByClassName(row, "rgGroupCol").length,
               masterTable = $find('<%=RadGrid1.ClientID%>').get_masterTableView(),
               rows = masterTable.get_element().rows,
               isChecked = sender.checked;
        sender.checked = !sender.checkbox;
 
        //Traverses the rows from the current header down and selects or deselects the GridDataItems
        for (var i = rowIndex + 1; i < rows.length; i++) {
            //If we encounter a grop header with the same group level we stop the selection/deselection
            if (rows[i].className.indexOf("rgGroupHeader") !== -1) {
                if ($telerik.getElementsByClassName(rows[i], "rgGroupCol").length === level) {
                    break;
                }
            } else if (isChecked) {
                masterTable.selectItem(rows[i]);
            } else {
                masterTable.deselectItem(rows[i]);
            }
        }
    }
 
   </script>


<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="ldsPayrollFlow" AllowMultiRowSelection="True"
                GridLines="None" Width="960px" AllowSorting="True"
        AutoGenerateColumns="False" AllowFilteringByColumn="True"
                AllowPaging="True" PageSize="15" EnableAJAX="true"
        EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="25"
        CellSpacing="0">
 
                <PagerStyle Mode="NumericPages"></PagerStyle>
              
                <MasterTableView DataSourceID="ldsPayrollFlow" DataKeyNames="SID" GroupLoadMode="Client">
                    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="10px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="10px"></HeaderStyle>
                    </ExpandCollapseColumn>
 
                    <GroupByExpressions>                                              
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="DisplayName" FieldName="DisplayName" HeaderText="Staff Name"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="DisplayName" ></telerik:GridGroupByField>
                        </GroupByFields>                        
                        </telerik:GridGroupByExpression>
 
                    </GroupByExpressions>
                    <GroupHeaderTemplate>
                            <asp:CheckBox ToggleType="CheckBox" ID="GroupHeaderCheckBox" OnClick="GroupToggleSelection(this);" runat="server"></asp:CheckBox>
                    </GroupHeaderTemplate>
 
                    <Columns>
                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" Visible="TRUE" HeaderStyle-Width="10" Display="false">
                            </telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn DataField="SID" HeaderText="SID" ReadOnly="True"
                            SortExpression="SID" UniqueName="SID" Visible=false>
                        </telerik:GridBoundColumn>

Joe
Top achievements
Rank 1
 answered on 26 Sep 2013
7 answers
127 views
Iam Facing issue(creating dynamic column with filtertemplate in radcomboboxes in rad grid )
  
We are using radgrid.We are generating dynamic columns with combobox in filter template .We are generating Column dynamically.
  
Issue is Combobox selected changed event is not woring. 
  
i am doing this programmatically using ITEMPLATE interface by inheriting in a class and calling InstantiateIn method using Creating combox control.
Naga
Top achievements
Rank 1
 answered on 26 Sep 2013
3 answers
217 views
Hi, 
I want to call a javascript function when user clicks hierarchy expand button. my hierarchyloadmode = serverondemand and i don't want to change to  hierarchyloadmode = client because i takes very long time to load radgrid. in addition my telerik version doesn't support HierarchyLoadMode.Conditional

is there any solution? 
Kostadin
Telerik team
 answered on 26 Sep 2013
3 answers
189 views
Click on the same date two times gives NULL value second time.
How do I get away with it, so I get the same value even if I click the same date more than once?

Try: http://demos.telerik.com/aspnet-ajax/calendar/examples/programming/serversideevents/defaultcs.aspx
Changed Date to: "9/30/2013 12:00:00 AM"
Changed Date to: "none"
Shinu
Top achievements
Rank 2
 answered on 26 Sep 2013
4 answers
146 views
how can i have a grid with a image collumn binded image from database
Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Sep 2013
6 answers
241 views
I am using RadSchduler, In which before using UpdatePanel, onappointmentcommand works well. But when I use UpdatePanel it never calls the event (when I insert / cancel) an Appointment. 
 
Any kind of help is fine. 
 
Following is the code I am using 
 
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <ContentTemplate><telerik:RadScheduler ID="RadScheduler1" runat="server"
      SelectedView="MonthView" Skin="WebBlue"
      onappointmentcommand="RadScheduler1_AppointmentCommand1"
       onload="RadScheduler1_Load" DataKeyField="ID" DataSubjectField="Subject"
      DataStartField="Start" DataEndField="End"
      onappointmentdelete="RadScheduler1_AppointmentDelete" AllowEdit="false" Height="600px">
 
        <InlineInsertTemplate>
            <asp:DropDownList runat="server" ID="ddlAgenTeamLst" DataSourceID="objTeam" DataTextField="name" DataValueField="id"></asp:DropDownList>
            <asp:Button ID="btnInsert" runat="server" CommandName="Insert" Text="Insert"/>
            <asp:Button ID="btnCancel" runat="server" CommandName="Cancel" Text="Cancel"/>
        </InlineInsertTemplate>
</telerik:RadScheduler></ContentTemplate>  </asp:UpdatePanel>
 
In the above onAppointmentDelete is working fine in both the cases. But I need to get the value from the drop down list when I Insert a data, So i am unable to use "OnAppointmentInsert".
Mohan Prasath
Top achievements
Rank 1
 answered on 26 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?