Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
867 views
Hello all,

I have been looking for a while now, and have not been able to find a solution for my problem, which could possible be very easy to fix.

I have a grid in which when the user selects a row I want it to stay highlighted. Simple enough, I can make it work, as long as there is no postback. 

I have looked at numerous posts, including Telerik's demos (http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/row-selection/defaultvb.aspx?#qsf-demo-sourcehttp://www.telerik.com/help/aspnet-ajax/grid-selecting-row-with-click-client-side.html) and yet, I cannot find a solution.

This is the style on my page:
<style type="text/css">
    .rgSelectedRow, .rgSelectedRow > td
    {
        padding:4px;
        border-right: solid 1px #CBD2DA;
        background:gray !important;
    }
</style>

This is the Grid's client settings:
<ClientSettings>
    <Selecting AllowRowSelect="True"></Selecting>
    <ClientEvents OnRowClick="namespace.rowClick" />
</ClientSettings>

Now, the rowClick JS:
rowClick: function (sender, eventArgs) {
    var masterTable = $find('<%=grdSpam.RadGrid.ClientID%>').get_masterTableView();
    var rowindex = eventArgs.get_itemIndexHierarchical();
    var dataItem = masterTable.get_dataItems()[rowindex].get_element();
    var spamFilterID = dataItem.attributes["SpamFilterID"].value;
    $find('<%=pnlSpamQuarantine.ClientID%>').ajaxRequest('ViewFile' + '|' + spamFilterID + '|' + rowindex);
}

Now, when the user clicks on a row, it stays highlighted as long as I remove the ajaxRequest. 
I have also tried to set the EnablePostBackOnRowClick and using it instead of the Javascript, but the problem remains.

In an effort to force the row to be selected coming back, I have also added code to the AjaxRequest that sets the row.Selected = True. And I verified that it is still True during the Grid PreRender event.

BTW, I am not using the GridClientSelectColumn.

Can anyone shed a light as to what I am missing here?

Thanks,
Alex



Alex
Top achievements
Rank 1
 answered on 12 Dec 2013
1 answer
146 views

I am looking at RadHtmlChart. At the moment, I don’t know how to make the data points clickable easily.

In our scenario, the URL values for each data point will be constructed during the process of binding the data to the chart on the server side.

Can anybody advise?

Thanks!

Danail Vasilev
Telerik team
 answered on 12 Dec 2013
1 answer
62 views
Is there anything in the RadGrid that would cause the GroupBy rendering to behave differently on IE7 vs IE8?

I have this grid defined:
<telerik:RadGrid ID="grdWorkflow" Skin="Outlook" AutoGenerateColumns="False" GridLines="None"
    Width="900px" OnNeedDataSource="grdWorkflow_NeedDataSource" OnItemDataBound="grdWorkflow_ItemDataBound"
    OnItemCreated="grdWorkflow_ItemCreated" OnColumnCreated="grdWorkflow_ColumnCreated"
    runat="server">
    <ClientSettings AllowColumnsReorder="false">
        <Resizing AllowColumnResize="true" />
    </ClientSettings>
    <MasterTableView Caption="List of workflows" DataKeyNames="GroupID" ClientDataKeyNames="GroupID,StepID"
        GroupsDefaultExpanded="true" TableLayout="Fixed" Style="float: left;" Summary="View Workflow">
        <NoRecordsTemplate>
            <div class="bold">
                There are no approvers set up to approve this ITPR. You must either select a manager
                to approve or contact your Customer Service Representative (CSR) for further assistance.
            </div>
        </NoRecordsTemplate>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField HeaderValueSeparator=" " FieldName="StepName" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="ArtificialSortingField" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridBoundColumn UniqueName="StepID" DataField="StepID" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="StepName" HeaderText="Step Name" DataField="StepName"
                Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="GroupID" HeaderText="GroupID" DataField="GroupID"
                Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="GroupName" HeaderText="Approval Group Name"
                DataField="GroupName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="RoleID" HeaderText="Role ID" DataField="RoleID"
                Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="RoleName" HeaderText="Role" DataField="RoleName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="SectionName" HeaderText="Section" DataField="SectionName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Approvers" HeaderText="Potential Approvers"
                DataField="Approvers">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

The output rendering on IE7 looks like:

<tr class="rgGroupHeader">
    <td class="rgGroupCol">
        <td colSpan="1">
            <p>
                ...

On IE8 & IE9 it renders to:

<tr class="rgGroupHeader">
     <td class="rgGroupCol">
         <td colSpan="4">
             <p>
                 ...

I could understand if different versions of IE do things differently, or if we had some rogue CSS changing things, but why is the RadGrid rendering differently by browser? This causes the grouping to look not look correct on the IE7.



Venelin
Telerik team
 answered on 12 Dec 2013
1 answer
139 views
I, it is possible to get de range of selected date in telerik RadScheduler. 

 I want to get the start date and the end date selected.

In this example: 10/12/2013 07:00 and 10/12/2013 10:00.

Any help? Thanks
Plamen
Telerik team
 answered on 12 Dec 2013
1 answer
99 views
Hi,

This question actually refers to the kendo scheduler. We are trying out the product and have a few questions.

-- Can I change the edit event template and allow weekly recurrence only?  Also, The user should only be able to select weekly and no other settings like days and end time etc.

-- Can I restrict the time to 1 hour and disable date selection?

Thanks

Vasu

Alexander Popov
Telerik team
 answered on 12 Dec 2013
2 answers
137 views
i have a requirement to access a Label control that sits in the GroupTemplate.
the issue for me, resides in the ItemDataBound event of the RadListView.

when i FindControl for "lblFileName", which sits in the ItemTemplate, it finds it OK.
but when i FindControl for "lblHeader", which sits in the GroupTemplate, it can't find it.

my desire is to have a different Group Header Label for each individual Group. This Label will be programatically created so it is not possible to know what it would be before the Page Loads.





My HTML is:
<telerik:RadListView ItemPlaceholderID="plItemHolder"  GroupPlaceholderID="plGroupHolder" runat="server" ID="lstCSV">
 
            <LayoutTemplate>
                <asp:PlaceHolder runat="server" ID="plGroupHolder"></asp:PlaceHolder>    
            </LayoutTemplate>
            
            <GroupTemplate>
                  <asp:Label ID="lblHeader" runat="server" Text="<h3>hello world</h3>"></asp:Label>
                  <asp:PlaceHolder runat="server" ID="plItemHolder"></asp:PlaceHolder>           
            </GroupTemplate>
 
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lblFileName"></asp:Label>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
 
        </telerik:RadListView>


i am then calling the following Method to Bind to my RadListView

Private Sub getFileNames()
 
    Dim di As New DirectoryInfo(Server.MapPath(uploadCSV.TargetFolder))
    Dim diar1 As FileInfo() = di.GetFiles()
 
    lstCSV.DataSource = diar1
    lstCSV.DataBind()
 
End Sub

finally, i have the following in the ItemDataBOund event of the RadListView

Private Sub lstCSV_ItemDataBound(sender As Object, e As RadListViewItemEventArgs) Handles lstCSV.ItemDataBound
 
     Dim lblFileName As New Label
     Dim lblHeaderName As New Label
     Dim tempHeaderName As String = String.Empty
 
     lblFileName.Text = TryCast(TryCast(e.Item, RadListViewDataItem).DataItem, FileSystemInfo).Name
 
 
     Dim s As String() = uploadCSV.AllowedFileExtensions
 
     For i As Integer = 0 To s.Length - 1
         If tempHeaderName = String.Empty Then
             tempHeaderName = lblFileName.Text.Replace("." + s(i).ToString, "")
         Else
             tempHeaderName = tempHeaderName.Replace("." + s(i).ToString, "")
         End If
     Next
 
 
 
     Dim lblBindName As New Label
     Dim lblBindHeader As New Label
 
     lblBindName = e.Item.FindControl("lblFileName")
     lblBindHeader = e.Item.FindControl("lblHeader")
 
     If Not IsNothing(lblBindName) Then lblBindName.Text = lblFileName.Text
     If Not IsNothing(lblBindHeader) Then lblBindHeader.Text = tempHeaderName
 
 
 End Sub

David
Top achievements
Rank 1
 answered on 12 Dec 2013
5 answers
567 views
I want the user to be able to change the Filter option between StartsWith and Contains by using a couple of radio buttons. Is it possible to do this client side or do I have to do a postback to change this setting?
Nencho
Telerik team
 answered on 12 Dec 2013
1 answer
44 views
I have a tabstrip/multipage and I'm calling a JS function on page load (and tried jquery document ready) that opens a new tab client-side.
I use the same code to open tabs all over the place without a problem, but the first tab that is created always makes two requests for the page set in content_url.  I can see this happening in fiddler. 

What would cause this and how do I stop it?


Dimitar Terziev
Telerik team
 answered on 12 Dec 2013
1 answer
98 views
Hi,

I have a button with all four margins set to 5px in a sliding pane.  I am doing this so that there is some space between the pane and my control.  However, when in IE8/IE9 compatibility view, the button will incorrectly align itself to the left of the pane.  (see before hover.png)  On hover, the button will move to the correct spot.  (see after hover.png)  When not in compatibility view, everything works as intended.

Default.aspx (snippet)
<telerik:RadSplitter runat="server">
<telerik:RadPane runat="server">
<telerik:RadSlidingZone runat="server">
<telerik:RadSlidingPane runat="server" Title="Slider">
<telerik:RadButton runat="server" Text="Hover" style="margin: 5px;"/>
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
</telerik:RadSplitter>

There is no code-behind, and this is using a default Telerik ASP.NET web application.  I can provide a complete project if necessary -- this is just a short mock-up that I wrote to illustrate the issue.

Is this a known problem, or am I using my CSS margins incorrectly?

Thank you very much for your time!

Regards,
Brian Chambers
Shinu
Top achievements
Rank 2
 answered on 12 Dec 2013
1 answer
79 views
I have a radscheduler in a month view. User enters an appointment via my custom form. He enters a start date only and a subject . NO TIME. So i am currently using the current time and plus 1 hour as end time. He can enter end day also if he wants. Or I just take same beginning day as end date as well. Lets say he made 5 appointments. 8-9,9-10,10-11,11-12,12-1. Now he wishes to drag the 11-12 appointment for this day and drop it between 8-9 and 9-10. I have to adjust the appointment times for the other appointments and also the UI. How do i proceed?Any thoughts? If you need information,do ask.Thanks
Plamen
Telerik team
 answered on 12 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?