Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hey

Story:

I using RadGrid with ExpandCollapseColumn and I want to show for every user his Departments + Leader if you click on a departments it is Expanding and you can see the members of the departments  click on one user and again the column is Expanding then you can see from date to date the working time in % and his vacation days so far its working 


Problem:

In the last step when I want to show the specific from date to date the working time in % etc... it not working I have know for testing inserted that only one user in a specific department has from date to date the working time in % etc.. and so the  problem is IT is displaying it to every user it doesn't meter if he has inserted from date to date the working time in % etc.. or not ..
<asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="DepEmpGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DepEmpGrid"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="DepEmpGrid" OnPreRender="DepEmpGrid_PreRender" ShowStatusBar="True" DataSourceID="LeaderViewSQL" runat="server" AutoGenerateColumns="False"
        AllowSorting="True" AllowPaging="True" GridLines="None" CellSpacing="0" OnNeedDataSource="DepEmpGrid_NeedDataSource" >
        <PagerStyle Mode="NumericPages" />
        <MasterTableView DataKeyNames="DepartmentId" DataSourceID="LeaderViewSQL" AllowMultiColumnSorting="true"  ExpandCollapseColumn-CollapseImageUrl="~/Image/SingleMinus.gif" ExpandCollapseColumn-ExpandImageUrl="~/Image/SinglePlus.gif">
            <DetailTables>
                <telerik:GridTableView DataKeyNames="UserId" DataSourceID="DepartmentSQL" Width="100%" runat="server">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="DepartmentId" MasterKeyField="DepartmentId" />
                    </ParentTableRelation>
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="AnnualVacationId" DataSourceID="AnnualVacationSQL" Width="100%" runat="server">
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="UserId" MasterKeyField="UserId" />
                            </ParentTableRelation>
                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
                            <Columns>
                                <telerik:GridBoundColumn SortExpression="FromDate" HeaderText="From date" HeaderButtonType="TextButton" DataField="FromDate" UniqueName="FromDate" DataFormatString="{0:dd/MM/yyyy}"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="ToDate" HeaderText="To date" HeaderButtonType="TextButton" DataField="ToDate" UniqueName="ToDate" DataFormatString="{0:dd/MM/yyyy}"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="WorkingTime" HeaderText="Working time in %" HeaderButtonType="TextButton" DataField="WorkingTime" UniqueName="WorkingTime"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="VacationDays" HeaderText="Vacation days" HeaderButtonType="TextButton" DataField="VacationDays" UniqueName="VacationDays"></telerik:GridBoundColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                            </EditFormSettings>
                        </telerik:GridTableView>
                    </DetailTables>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                     
                    <Columns>
                        <telerik:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton" DataField="Name" UniqueName="Name"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton" DataField="Email" UniqueName="Email"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="AdDomain" HeaderText="AdDomain" HeaderButtonType="TextButton" DataField="AdDomain" UniqueName="AdDomain" Visible="false"></telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                    </EditFormSettings>
                </telerik:GridTableView>
            </DetailTables>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn SortExpression="DepartmentName" HeaderText="DepartmentName" DataField="DepartmentName" UniqueName="DepartmentName"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn SortExpression="Leader" HeaderText="Leader" DataField="Leader" UniqueName="Leader"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DepartmentId" DataType="System.Int32" FilterControlAltText="Filter DepartmentId column" HeaderText="DepartmentId" SortExpression="DepartmentId" UniqueName="DepartmentId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UserId" DataType="System.Int32" FilterControlAltText="Filter UserId column" HeaderText="UserId" SortExpression="UserId" UniqueName="UserId" Visible="false">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
 
 
    <asp:SqlDataSource ID="LeaderViewSQL" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>"
        SelectCommand="SELECT * FROM [LeaderView]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="DepartmentSQL" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>"
        SelectCommand="SELECT * FROM [UserView] WHERE ([DepartmentId] = @DepartmentId)">
        <SelectParameters>
            <asp:SessionParameter Name="DepartmentId" SessionField="DepartmentId" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="AnnualVacationSQL" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>"
        SelectCommand="SELECT * FROM [AnnualVacation] WHERE UserId =@UserId">
        <SelectParameters>
            <asp:SessionParameter Name="UserId" SessionField="UserId" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>





Thanks for help and fast answer 

Feel free to ask if you need something more 

Pavlina
Telerik team
 answered on 23 Apr 2013
4 answers
161 views
I have very simple markup on my editor that worked grate for last few years. Now with ie9 I see an spacing issue.  According to Developer Tools  (F12) <br> is surrounded with “Text - Empty Text Node” this is happening in IE9 only. IE7,8 and FF works correctly.
Can you please help to resolve this
<div class="prprod_name "><strong><span class="prlabel">Name: </span></strong>Test </div>
<br />
<div  class="prprod_desc"><strong><span class="prlabel">Description: </span></strong>Desc Test</div>
<br />

Thank you
Orest
Moojjoo
Top achievements
Rank 1
 answered on 23 Apr 2013
1 answer
130 views
Hello, 

I am using a RadRotator in Sitefinity. I have bound images to it on PageLoad. It works fine. Now I want to rebind the control on filtering by category. When I click the category the DataSource is new, but it doesn't do anything to the images. It still shows the original set.

This is how I bind:

VideosCarousel.DataSource = GetVideos("All");
VideosCarousel.DataBind();

And to rebind I do this:

VideosCarousel.DataSource = null;
VideosCarousel.DataBind();             
VideosCarousel.DataSource = GetVideos("Business");
VideosCarousel.DataBind();

The categories are "a" links. Like this:

<li><a id="all" onclick="GetAllVideos(this)">All</a></li>
 <li><a id="buss" onclick="GetFilteredVideos(this)">Business</a></li>
<li><a id="cnh" onclick="GetFilteredVideos(this)">Community&Health</a></li>
<li><a id="tech" onclick="GetFilteredVideos(this)">Technology</a></li>
Slav
Telerik team
 answered on 23 Apr 2013
14 answers
360 views
i created a custom skin for grid.
skin applied successfully on grid but only edit and delete image not displayed in grid.

regards,
Jayesh Goyani
Pavlina
Telerik team
 answered on 23 Apr 2013
1 answer
74 views
Hi

There is a radmonthyearpicker. Using javascript, how to get the previous year in numerics based on a selected date?

Thanks
Princy
Top achievements
Rank 2
 answered on 23 Apr 2013
2 answers
77 views
The problem I am having is with the SplitButton Image showing up as a big red "X". Here is the XML for how I am defining the button. The ImageURL path worked perfectly on no splitbutton buttons in the same XML file...any thoughts...
<Group Text="Widgets">
    <SplitButton Size="Large" Text="Descriptive" ImageUrl="images/widgets_descriptive.png" CommandName="mangeDescriptive">
      <Button Text='ABC Codes' />
      <Button Text='Planning Data'/>
    </SplitButton>
    <SplitButton Size="Large" Text="Aggregation" ImageUrl="images/widgets_aggregation.png" CommandName="manageAggregation">
      <Button Text='Rollup Aggregation' />
    </SplitButton>
    <SplitButton Size="Large" Text="Spreadsheets" ImageUrl="images/widgets_spreadsheets.png" CommandName="manageSpreadsheets">
      <Button Text='Monthy Forecast' />
    </SplitButton>
    <SplitButton Size="Large" Text="Charts" ImageUrl="images/widgets_charts.png" CommandName="manageCharts">
      <Button Text='Monthy Forecast' />
    </SplitButton>
    <SplitButton Size="Large" Text="Dashboard" ImageUrl="images/widgets_dashboard.png" CommandName="manageDashboard">
      <Button Text='Alert Dashboard'/>
    </SplitButton>
  </Group>
Michael
Top achievements
Rank 1
 answered on 23 Apr 2013
1 answer
56 views
When I try to paste in a numbered list in an editor control, it renumbers the list to start at 1 all the time. For example:

5.1   Lk’;sald
5.2   Sd;as’l ‘;sd
5.3   Ksd ;kasd09isad

Gets pasted as

 

  1. kjsakld
  2. lskd;l ksa
  3. sd';lsad

What setting can I adjust to clear up this issue?  Thanks
Joe

 

 

 

Nikolay
Telerik team
 answered on 23 Apr 2013
1 answer
83 views
<table>
        <tr>
            <td>
                <asp:TextBox ID="txt" runat="server" TabIndex="0"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="Goal"
                    ControlToValidate="txt" Display="None" ErrorMessage="Please select" SetFocusOnError="True"></asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender HighlightCssClass="highlight" ID="ValidatorCalloutExtender1"
                    TargetControlID="RequiredFieldValidator1" runat="server">
                </cc1:ValidatorCalloutExtender>
            </td>
        </tr>
        <tr>
            <td align="right">
                <span class="error">*</span>Start Date :
            </td>
            <td align="left">
                <telerik:RadDatePicker ID="radCalender" runat="server" TabIndex="1" Width="205">
                    <Calendar ID="Calendar4" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                        ViewSelectorText="x" runat="server">
                    </Calendar>
                    <DateInput ID="DateInput4" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" runat="server">
                    </DateInput>
                </telerik:RadDatePicker>
                <asp:RequiredFieldValidator ID="rvCalender" runat="server" ControlToValidate="radCalender"
                    InitialValue="" Display="None" ValidationGroup="Goal" ErrorMessage="<%$Resources:CCMResource,USER_GOAL_STARTDATE %>"
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender HighlightCssClass="highlight" ID="vcCalender" TargetControlID="rvCalender"
                    runat="server">
                </cc1:ValidatorCalloutExtender>
            </td>
        </tr>
        <tr>
            <td align="right">
                <span class="error">*</span> Managed Population : 
            </td>
            <td align="left">
                <telerik:RadComboBox ID="radComboManagedPopulationGoals" AppendDataBoundItems="true"
                    Width="200px" TabIndex="2" DataValueField="ProgramId" DataTextField="ProgramName"
                    runat="server">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="Select" Value="0" />
                        <telerik:RadComboBoxItem runat="server" Text="Item" Value="1" />
                    </Items>
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="rfvManagedPopulationGoals" runat="server" ValidationGroup="Goal"
                    ControlToValidate="radComboManagedPopulationGoals" InitialValue="Select" Display="None"
                    ErrorMessage="<%$Resources:CCMResource,Assignment_Select %>" SetFocusOnError="True"></asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender ID="vdCManagedPopulationGoals" TargetControlID="rfvManagedPopulationGoals"
                    runat="server">
                </cc1:ValidatorCalloutExtender>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btn" runat="server" ValidationGroup="Goal" />
            </td>
        </tr>
    </table>
Hi ,
I have a Problem in raddatePicker.
I have a form. In this, I have RadDatePicker, RadCombobox and radbutton Controls and trhese are mandatory fields. on Button click it will call the Callout Extenders for mandatory Fields. In my Form First is RadDatePicker And next is RadCombobox.On buttonClick it showing first calloutoutextender for Radcombox instead of RadDatePicker. I want RaddatePicker's CalloutExtender will be called First and then rest of controls.

Thanks in Advance.
Prathyusha
Top achievements
Rank 1
 answered on 23 Apr 2013
8 answers
621 views
I am trying to detect when a user presses the Tab key inside the last column of my inline edit form.  When they press Tab on the last column, I want the grid to create a new row, put it into edit mode, and move the cursor there.

I can already do this with the Enter key but I cannot figure out how to tell when the Tab key is pressed in the last column and only when in the last column.

Any ideas?  I know I can add character/key code 9 for Tab but I can't tell which column I'm in when it detects it.  I'm sure it's probably something simple that I've overlooked.

The last column's definition:

<telerik:GridBoundColumn ConvertEmptyStringToNull="False" DataField="Email" FilterControlAltText="Filter Email column"
    HeaderText="Email" SortExpression="Email" UniqueName="Email" EmptyDataText=""
    ColumnEditorID="txtGridEdit_Email" ShowSortIcon="False">
    <HeaderStyle Width="100px" Wrap="False" HorizontalAlign="Left" CssClass="grid-header" VerticalAlign="Top"/>
    <ItemStyle HorizontalAlign="Left" Width="100%" VerticalAlign="Top" />
</telerik:GridBoundColumn>

The column editor:

<telerik:GridTextBoxColumnEditor ID="txtGridEdit_Email" runat="server" TextBoxStyle-Width="99%"  />


The javascript I'm using on the Keypress event (client side):

/// <summary>
/// Handles the client side KeyPress event of the Athletes grid.
/// </summary>
function OnKeyPress(sender, args) {
    //Check for the Enter/Tab key being pressed
    if ((args._domEvent.charCode == 13) || (args.get_keyCode() == 13)) {
        //If currently editing a row, commit the changes and stop the editing
        if (rowEditedItem) {
            bHasChanges = false;
            $find(sAthleteGridID).get_masterTableView().updateItem(rowEditedItem);
        }
    }
    else if ((args.get_keyCode() == 27) || (args._domEvent.charCode == 27)) //Check for the Esc key being press
    {
        $find(sAthleteGridID).get_masterTableView().fireCommand("CancelAll", ""); //Cancel any editing activities in the grid
        $find(sAthleteGridID).get_masterTableView().clearSelectedItems(); //De-select any rows
    }
}
J
Top achievements
Rank 1
 answered on 23 Apr 2013
3 answers
161 views
Hi,

How to check and validate that the month selected from the second radmonthyear picker comes after the month selected from first radmonthyearpicker?

Thanks
Princy
Top achievements
Rank 2
 answered on 23 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?