Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
86 views
hi,

I have radgrid ,its showing two others column but in database view its only exists, Bold column not exists in view. 

I attached output of radgrid.

View's Column
---------------------
 ,[StartDate]      ,[EndDate]      ,[DepartmentName]      ,[LabourRate]      ,[BillingRate]      ,[AgencyRate]      ,[FirstName]      ,[LastName]
 ,[Description]      ,[ManagerFirst]   ,[ManagerLast]     ,[WeekEnding]    ,[Hours]    ,[RateType]  ,[TimesheetStatus]  ,[TimesheetID]

---------------------


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>Current Contractors</h1>
    <br/>
        <telerik:RadButton ID="RadButton1" runat="server" onclick="RadButton1_Click" 
        Text="Previous">
    </telerik:RadButton>
    <telerik:RadButton ID="RadButton2" runat="server" onclick="RadButton2_Click" 
        Text="Next">
    </telerik:RadButton>
    <br/>
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" 
        CellSpacing="0" DataSourceID="ObjectDataSource1" GridLines="None" 
        AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
        ExportSettings-FileName="Payroll Report" ExportSettings-ExportOnlyData="False" 
        ExportSettings-HideStructureColumns="True" ExportSettings-IgnorePaging="True" 
        ExportSettings-OpenInNewWindow="True" 
         
 >
<MasterTableView DataKeyNames="Name,StartDate,EndDate,DepartmentName,LabourRate,FirstName,LastName,Description,ManagerFirst,ManagerLast,WeekEnding,RateType,TimesheetStatus" 
            DataSourceID="ObjectDataSource1" CommandItemDisplay="Top"
            CommandItemSettings-ShowExportToCsvButton="True" CommandItemSettings-ShowExportToExcelButton="True" CommandItemSettings-ShowExportToPdfButton="True"  CommandItemSettings-ShowExportToWordButton="True" CommandItemSettings-ShowAddNewRecordButton="False" CommandItemSettings-ShowRefreshButton="False" CommandItemStyle-HorizontalAlign="Left"
  
            >
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
                <telerik:GridBoundColumn DataField="ContractorName" FilterControlWidth="20px" 
            FilterControlAltText="Filter ContractorName column" HeaderText="Contractor" 
            ReadOnly="True" SortExpression="FirstName" UniqueName="ContractorName"  >
        </telerik:GridBoundColumn>

        
        <telerik:GridBoundColumn DataField="Description" 
            FilterControlAltText="Filter Description column" HeaderText="Job" FilterControlWidth="20px" 
            ReadOnly="True" SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>

        <telerik:GridBoundColumn DataField="ManagerName" 
            FilterControlAltText="Filter ManagerName column" HeaderText="Manager" FilterControlWidth="20px" 
            ReadOnly="True" SortExpression="ManagerFirst" UniqueName="ManagerName"  >
        </telerik:GridBoundColumn>


      

       
        <telerik:GridBoundColumn DataField="AgencyRate" DataType="System.Decimal" FilterControlWidth="20px" DataFormatString="{0:C}"
            FilterControlAltText="Filter AgencyRate column" HeaderText="Agency Rate" 
            SortExpression="AgencyRate" UniqueName="AgencyRate">
        </telerik:GridBoundColumn>

        <telerik:GridBoundColumn DataField="LabourRate" DataType="System.Decimal" FilterControlWidth="20px" DataFormatString="{0:C}"
            FilterControlAltText="Filter LabourRate column" HeaderText="Labour Rate" 
            ReadOnly="True" SortExpression="LabourRate" UniqueName="LabourRate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="BillingRate" DataType="System.Decimal" FilterControlWidth="20px" DataFormatString="{0:C}" 
            FilterControlAltText="Filter BillingRate column" HeaderText="Billing Rate" 
            SortExpression="BillingRate" UniqueName="BillingRate">
        </telerik:GridBoundColumn>


       <telerik:GridBoundColumn DataField="StartDate" DataType="System.DateTime" FilterControlWidth="20px" DataFormatString="{0:dd/MM/yyyy}"
            FilterControlAltText="Filter StartDate column" HeaderText="Start" 
            ReadOnly="True" SortExpression="StartDate" UniqueName="StartDate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DepartmentName" 
            FilterControlAltText="Filter DepartmentName column" HeaderText="Department" FilterControlWidth="20px" 
            ReadOnly="True" SortExpression="DepartmentName" UniqueName="DepartmentName"  >
        </telerik:GridBoundColumn>
        
  <telerik:GridBoundColumn DataField="Name" FilterControlWidth="20px" 
            FilterControlAltText="Filter Name column" HeaderText="Name" ReadOnly="True" 
            SortExpression="Name" UniqueName="Name" >
        </telerik:GridBoundColumn>        

        <telerik:GridBoundColumn DataField="Hours" DataType="System.Int32" FilterControlWidth="20px" 
            FilterControlAltText="Filter Hours column" HeaderText="Hours" 
            SortExpression="Hours" UniqueName="Hours">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="RateType" FilterControlWidth="20px" 
            FilterControlAltText="Filter RateType column" HeaderText="RateType" 
            ReadOnly="True" SortExpression="RateType" UniqueName="RateType">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="TimesheetStatus" FilterControlWidth="20px" 
            FilterControlAltText="Filter TimesheetStatus column" 
            HeaderText="Status" ReadOnly="True" SortExpression="TimesheetStatus" 
            UniqueName="TimesheetStatus">
        </telerik:GridBoundColumn>
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
   

      <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetPayrollReport" TypeName="Business.PayrollReportList"  
                SortParameterName="sortBy"
        >
          <SelectParameters>
            <asp:SessionParameter SessionField="WeekEnding" DbType="DateTime" Name="WeekEnding" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

virender
Top achievements
Rank 1
 answered on 02 Jan 2013
1 answer
77 views
My group is working on software that is used by several public schools. The UI has to be Section 508 compliant (for students with disabilities, etc), which includes being able to navigate the site using only the keyboard. Currently, we're making sure (using only the keyboard) a user can effectively [TAB] to all controls. The issue we're facing is that the DockCommands generated are skipped when tabbing through the UI. We're creating the DockCommands programatically in the C# code like this:

var cmd = new DockCommand();
cmd.AutoPostBack = true;
cmd.Name = commandText;
cmd.Text = commandText;
cmd.CssClass = cssClass;

However, this seems to always create an anchor tag with an empty span tag nested inside. The span contains a background image. Because the anchor has no href attribute and the image is just a background of the span, the tab skips right over it.

Are we doing something wrong? Or is there a way to work around this?

Any help would be much appreciated. Thanks.
Slav
Telerik team
 answered on 02 Jan 2013
0 answers
77 views
Hi,

(1) if a there is not <br />  tag in any data item then grid does displays all rows and also vertical scroll bar is not visible then.

(2) if a there is <br />  tag  in any data item (for multi-line text in a row) then grid does not display all rows (displays rows untill the row with <br /> tag) and also vertical scroll bar is visible then.

How can I have same behavior mentioned in (1) with <br /> tag.



Sulman
Top achievements
Rank 1
 asked on 02 Jan 2013
3 answers
412 views
Hello,
I am having an issue where I have a multi-line RadEditor and when the user enters any text into the editor then submits that content to be saved to the database, RadEditor is adding a non-breaking space (see attachment).  I wanted to know how this can be prevented in the RadEditor through configuration instead of lots of find and replaces each time a RadEditor is used.

In SQL Server this is CHAR(13)+CHAR(10) in UTF-8 encoding on Regex.Replace(Input, "\u00A0", "").

<telerik:RadEditor ID="RadEditor1" runat="server" AllowScripts="True">
<Content>
</Content>
                    </telerik:RadEditor>
Rumen
Telerik team
 answered on 02 Jan 2013
1 answer
47 views
In my aspx page I do this:

 
<telerik:RadScriptManager ID="ScriptManager" Runat="Server" EnablePageMethods="True" ><br>        <CompositeScript><br>            <Scripts><br>                <asp:ScriptReference Path="~/Modules/TicketType/Ticket_TypeDDL.js" /><br>            </Scripts><br>        </CompositeScript><br>    </telerik:RadScriptManager>

   then in the referenced js file I have this:



 var ddlTicketTypeList = $find("<%= ddlTicketTypeList.ClientID %>");<br>   ddlTicketTypeList.trackChanges();


However, ddlTicketTypeList is always null. 

How do I resolve what is inside the code block using the referenced js files?
Angel Petrov
Telerik team
 answered on 02 Jan 2013
1 answer
92 views
Is it possible to set up the radcalendar so that I can populate the view with the data for that month/year shown, rather than having to do a page post back to do so, what I was thinking was an event would fire which would call a service (wcf or web service) and pull back the data in json format and then populate the calendar.
Angel Petrov
Telerik team
 answered on 02 Jan 2013
4 answers
233 views
I have a grid with a column defined as follows:
<telerik:GridCalculatedColumn FilterControlAltText="Filter column1 column" UniqueName="YrPercent" 
     DataFields="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,minTotal" 
     Expression="(({0} + {1} + {2} + {3} + {4} + {5} + {6} + {7} + {8} + {9} + {10} + {11})  / {12}) * 100.0" 
     Aggregate="Sum" HeaderText="Yr %" DataFormatString="{0:N3}%" FooterAggregateFormatString="{0:N3}%" 
     DataType="System.Double" FilterControlWidth="30px">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle Width="3.5%" HorizontalAlign="Center" />
    <ItemStyle HorizontalAlign="Right" />
  </telerik:GridCalculatedColumn>


As you can see, I'm looking for a percentage (in this case rather small ones, about .147 for example).  All of the fields referenced in the calculation are integers.  I've bound the grid with a call to a IQueryable method returning a call from LinqToSQL.  

As is, this grid crashes with a Operator '*' incompatible with operand types 'Int32?' and 'Double' error.  After much searching of your forums, I set the grid's  EnableLinqExpressions property = false and everything seems to work.

2 questions.
  1. Is there any way to get that expression to work without setting EnableLinqExpressions=false?
  2. What do I lose if I do set EnableLinqExpressions=false?



Boris
Top achievements
Rank 1
 answered on 02 Jan 2013
1 answer
224 views
Hi, i have a rad scheduler.
when am clicking add new recurrence am opening new popup window for adding records.
so in that i have a button for selecting members(popup page). so when am clicking this button am opening radwindow for selecting members in checked listbox.
so here am saving  values in session. and on button click am closing this select members popup and i want to refresh the parent popup that is add recurrent event popup and fillup checklistbox with session values.here am getting values in session. but the parent pop is not refreshing

this is my select members popup(child popup)
function CloseAndRebind(args) {
        GetRadWindow().BrowserWindow.refreshGrid(args); // Call the function in parent page
        GetRadWindow().close(); // Close the window
    }
function getRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}

function closeWindow() {
    getRadWindow().close();
}    

this is my parent popup(addrecurrent popup)
<script type="text/javascript">
        //<![CDATA[
        function openWin() {
            var oWnd = radopen("SelectMembers.aspx", "RadWindow1");
            oWnd.setSize(818, 565);
            oWnd.moveTo("100px", "60px");
        }
      </script> 
Marin Bratanov
Telerik team
 answered on 02 Jan 2013
3 answers
224 views
Hi,

I am displaying context menu on right click on schedular. its working fine but when i click on header of the schedular i dnt want to diplay it. Please do help.....



Thanks
Raju 
Helen
Telerik team
 answered on 02 Jan 2013
1 answer
137 views
Hi,

I am getting two tooltips (one is comming from the rad tooltip manager another one is default tooltip).

In my project i placed tooltip manager in Master page, I am getting  two tooltips for the link butoon in all over my application.

please provide sol to avoid these two tooltips.

I am sending my sample design page for your reference.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function TooltipBeforeShowHandler(sender, args) {

            var newTitle = sender.get_targetControl().title;
            if (newTitle) {
                sender.set_text(newTitle);
            }

        }     
    </script>
    <style type="text/css">
        #RadToolTipWrapper_RadToolTipManager1
        {
            z-index: 5895895 !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadToolTipManager ID="RadTooltipManager1" runat="server" AutoTooltipify="true"
            OnClientBeforeShow="TooltipBeforeShowHandler" Skin="Office2007">
        </telerik:RadToolTipManager>
        <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px">
            <telerik:RadDock ID="RadDock1" runat="server" Width="300px">
                <TitlebarTemplate>
                    <asp:LinkButton ID="lnkDomainTop" Style="text-decoration: none; padding-top: 5px"
                        ForeColor="black" Height="10px" Font-Bold="true" runat="server" Text="Morning Mesage"
                        ToolTip="Information domain"></asp:LinkButton>
                </TitlebarTemplate>
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" Text="Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning Hi, Good morning "></asp:Label>
                </ContentTemplate>
                <Commands>
                </Commands>
            </telerik:RadDock>
        </telerik:RadDockZone>
    </div>
    </form>
</body>
</html>

Marin Bratanov
Telerik team
 answered on 02 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?