Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views
Hello,

I am trying to have the filter-Boxes of a RadGrid resize with the columns of the Grid using a .css (.rgFilterBox). This works great with the width of the Box itself (which I have set to 99%), but of course the large box makes the icon of the filter-dialogue disappear. It tried to set a margin-right of 30px to have the icon shown anyway, but for some reason that doesn't work (although margin-left, -bottom and -top work just fine). Setting margin: 30px in the .css also creates 30px of space on the top, bottom and left side of the box, but not on it's right side.
Any suggestions on fixing this behaviour would be of great help.

Thanks in advance,
Robin
Eyup
Telerik team
 answered on 01 Aug 2012
14 answers
902 views

Hi,

Im using Prometheus Rad grid . i try to group the grid by three fields.

first two fields are gridboundcolumn and i have given them within the groupby expression and another field is template field. I enabled the grouping for this template field as per help document.

Below is the Code,

<

telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" SkinsOverrideStyles="false"AutoGenerateColumns="false" BorderWidth="1px" BorderStyle="Solid" BorderColor="ActiveBorder">

<ClientSettings AllowGroupExpandCollapse="true">

</ClientSettings>

<MasterTableView GroupLoadMode ="Client" >

<GroupByExpressions>

<telerik:GridGroupByExpression>

<SelectFields>

<telerik:GridGroupByField HeaderText=" " FieldName="Status" FormatString="{0:D}"

HeaderValueSeparator=" "></telerik:GridGroupByField>

</SelectFields>

<GroupByFields>

<telerik:GridGroupByField FieldName="Status" ></telerik:GridGroupByField>

</GroupByFields>

</telerik:GridGroupByExpression>

<telerik:GridGroupByExpression>

<SelectFields>

 <telerik:GridGroupByField HeaderText=" " FieldName="TSACode" FormatString="{0:D}"

 HeaderValueSeparator=" "></telerik:GridGroupByField>

 </SelectFields>

 <GroupByFields>

 <telerik:GridGroupByField FieldName="TSACode" SortOrder="Ascending"></telerik:GridGroupByField>

 </GroupByFields>

 </telerik:GridGroupByExpression>

</GroupByExpressions>

<Columns>

<telerik:GridBoundColumn Visible="false" HeaderText="Status" DataField="Status" UniqueName="Status"></telerik:GridBoundColumn>

<telerik:GridBoundColumn Visible="false" HeaderText="TSA" DataField="TSACode" UniqueName="TSACode"> </telerik:GridBoundColumn>

<telerik:GridBoundColumn Visible="false" HeaderText="PubId" DataField="PubId" UniqueName="PubId"></telerik:GridBoundColumn>

<telerik:GridTemplateColumn Groupable="true" GroupByExpression="Title GROUP BY Title"

ItemStyle-Width="60%" HeaderText="Title" UniqueName="Title">

<ItemTemplate>

<asp:HyperLink ID="hypLnk" CssClass="HyperLink" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>'

ToolTip="Publication Info" Target="_blank">

</asp:HyperLink>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn  HeaderText="Country" DataField="CountryCode" UniqueName="CountryCode">

</telerik:GridBoundColumn>

</

Columns>

</MasterTableView>

</telerik:RadGrid>

Actual Result : Grid is grouped according to the two fields mentioned in the group by expression. group is missing for "Title" template column. Im getting Title and country as dataitems

Expected Result: Would like to group the grid according to status,TSACode,Title with hyperlink and country should be dataitem inside the groups...

Thanks,
Mey

Shinu
Top achievements
Rank 2
 answered on 01 Aug 2012
0 answers
61 views
Hi,

How to insert data into SQL database and display it in radgrid at client side .

As I'm new to script and telerik , pls provide sample code for the following scenario

1) A dropdown with ProductName as text, and Product id as value
2) A Qty textbox.
3) A Radbutton (ADD ). When the user select the products, & enter the qty. and by clicking the ADD the data has to be update on the grid / or on the sql database.

Pls provide sample code

ProductID numeric
ProductName nvarchar(50)
Qty numeric

SAFAA
Top achievements
Rank 1
 asked on 31 Jul 2012
3 answers
95 views
Hi, I am having problems with getting page sizes reasonable and I would love some input from experienced developers.

Just as an example, I converted an old asp page which displayed data pulled from a database in a small table. The table, plus a static menu, came to 32,455 bytes.

Now I have converted the identical data, but using RadMenu and RadDatagrid. The pages look and function nearly identically (Ok, the rad page looks better) but the size is now 435,873 bytes. That's more than a 10 fold increase in size to make things look prettier. Am I missing something here? Many of my clients are in third world countries and don't have hi speed internet connections. I really need to keep my pages below 200,000 bytes.

Some of the more complex pages using Rad controls are approaching 1 MB, and I don't have pictures on them.

Is there a way of reducing the page size?

I can't seem to find a way to cache the radMenu, which appears on every page (it is in the MasterPage). Because the MasterPage is merged with the other content each time then it is not cached on the client side, so it takes seconds to load each time.

Has anyone found a way to cache the navigation menus (RadMenu)? I guess if I used frames (god forbid going back to ancient history) then I could cache the RadMenu.

I would really appreciate some tips and thoughts from those developing real applications that need to perform.

Do people think that a 500,000 bytes + size page is fine? Am I too old school?

Cheers

Ian.
Ian
Top achievements
Rank 1
 answered on 31 Jul 2012
0 answers
133 views
Hi all:

I have a custom control inside Sitefinity that implements the RadScheduler.  When the page loads, it shows correctly, but when I try to change the selected date, I get this error:

Server Error in '/SiteFinity' Application. DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

This properties are setted in the code behind.  This is the code I used:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Calendar.ascx.cs" Inherits="SitefinityWebApp.Controls.Calendar" %>
 
<telerik:RadScheduler ID="rsCalendar" runat="server" Skin="Office2007" ReadOnly="True"
                        SelectedView="MonthView" MonthView-VisibleAppointmentsPerDay="15"
                        OverflowBehavior="Expand" CustomAttributeNames="Link"
                        RowHeight="35px">
    <TimelineView UserSelectable="false" />
    <WeekView UserSelectable="false" />
    <DayView UserSelectable="false" />
    <AdvancedForm DateFormat="M/d/yyyy" TimeFormat="h:mm tt" />
    <AppointmentTemplate>   
        <a href='<%#Eval("Link") %>'><%#Eval("Subject")%></a>                   
        <%--<a href='CourseDescription.aspx?cid=<%#Eval("ID") %>'><%#Eval("Subject")%></a>--%>
    </AppointmentTemplate>
    <monthview visibleappointmentsperday="15" AdaptiveRowHeight="True" />
</telerik:RadScheduler>

And the code behind is 

protected void Page_Load(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
                FillCalendar(DateTime.Now);
            //}
        }
 
        protected void rsCalendar_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
        {
            FillCalendar(rsCalendar.SelectedDate);
        }
        /// <summary>
        /// Fills the calendar with the info
        /// </summary>
        private void FillCalendar(DateTime selDate)
        {
            List<CoursesByDate> cal = dbContext.GetCoursesByDate(selDate).ToList();
 
            rsCalendar.DataSource = cal;
            rsCalendar.DataKeyField = "CourseCode";
            rsCalendar.DataSubjectField = "Course_Description";
            rsCalendar.DataStartField = "Begin_Date";
            rsCalendar.DataEndField = "End_Date";
            rsCalendar.DataBind();
        }

What's wrong?
Eliana
Top achievements
Rank 1
 asked on 31 Jul 2012
2 answers
62 views
HI,

I need to display confirm box (With option ok/cancel) when user clicks on Cancel button inside an edit or insert form.
We are adding edit button in the grid as following :

<

 

 

telerik:GridButtonColumn UniqueName="btnEdit" CommandName="Edit" Text="Edit" ButtonType="PushButton"

 

 

 

Visible="false">

We tried using oncommand and writing some javascript code but that is not an option.
It interferes with required field validators.

The cancel button is autogenerated and we are not writing any code for it.

Please suggest something as it is an urgent requirement.

 

Prachi
Top achievements
Rank 1
 answered on 31 Jul 2012
3 answers
249 views
I need copy onkesspress event of txtName the value on txtHumanLabel when user update or insert.


I did this, but does not work

  var txtEditId = $telerik.$(masterTable.get_element()).find('input[id*="txtEId"]')[0];   --IS UPDATE??

                if (txtEditId == undefined) {
                    var txtHeader = $telerik.$(masterTable.get_element()).find('input[id*="txtHeader"]')[0];  -- IS INSERT
                    txtHeader.value = Name.value;
                   
                } else {

                    var txtHeader = $telerik.$(masterTable.get_element()).find('input[id*="txtHeader"]')[0];
                    var value = txtHeader.value;
                    if (value.length == 0) {
                        txtHeader.value = Name.value;
                    }
                }


regards
Jayesh Goyani
Top achievements
Rank 2
 answered on 31 Jul 2012
2 answers
222 views
Hi,

I have four listbox. Three of them contains items that could be transferred to the other. Users change the visible listbox with a radio button. Each listbox contains a different template item, so my listbox that receive items can't have a template item. I've try the client-side transfer mode but it's doesn't transfer the item completly; my item is display is plain text, without any html code. I've seen in the help documentation (http://www.telerik.com/help/aspnet-ajax/listbox-templates-overview.html) that I can't transfer template in client-side mode, only on server-side. I can't use transfer button between the listbox because we want the user to do one-click only to transfer one item, and not select and item and click on the button. I can't put a button element in each item because it will trigger an exception (ThrowIfMaxHttpCollectionKeysExceeded). Presently, I try to simulate a button with a div element, but I can't put an id in my item template because an id have to be unique in a HTML page, so I can't put an function assigned to this div...

Exemple of a listbox:
<telerik:RadListBox ID="lbxDepDisponibles"
        runat="server" Height="300px" Width="335px" Visible="false"
        TransferToID="lbxTraites" DataValueField="number" >
    <ItemTemplate>              
        <div class="listeDispo departementTraite">
            <div>
                <img class="adminButton" src="Images/Administre.gif" height="32" style="margin:0px" />
            </div>
            <div class="dispoInfo">
                <div class="cboContent" style="display:block;">
                    <span style="font-weight: bold;">
                        <%#DataBinder.Eval(Container, "Attributes['description']")%>
                        <span style="font-size: 10px;">
                            <br />Dep. # <%#DataBinder.Eval(Container, "Attributes['number']")%> - <%#DataBinder.Eval(Container, "Attributes['name']")%>
                        </span>
                    </span>
                </div>
            </div>
        </div>
    </ItemTemplate>
</telerik:RadListBox>


My question is: how can I transfer an item from one listbox to another, with the item template, without using the transfer button, with a div element (or any other html element that is not an input element) that play the button role in each item?

Thank you

  • Visual studio 2008 .NET 3.5 SP1
  • Windows 7
  • any browser
  • Telerik ASP.NET AJAX 2012.1.301.2
  • VB.NET
Rémy
Top achievements
Rank 1
 answered on 31 Jul 2012
4 answers
121 views
Hi guys. I'm just trying to get the simple export feature to work. I like the demo sample here (Export Demo) where the grid has the export buttons built in. I was able to get the buttons to show up in the grid, however, when they are clicked on, nothing happens. (Well, the data seems to be refreshed against the object data source, which isn't what I want to happen...but I guess that's a separate issue) I've tried it in two different browsers and it doesn't seem to be blocked by pop-up blockers. Is there something I'm missing?

Thanks!

        <telerik:RadGrid ID="grdEvals" runat="server" Width="720px" CellSpacing="0"
            DataSourceID="odsEvals" GridLines="None"
            onselectedindexchanged="grdEvals_SelectedIndexChanged" AllowPaging="True"
            AllowSorting="True" ShowGroupPanel="True" PageSize="20"
            ShowStatusBar="True"  >
            <ExportSettings IgnorePaging="True" >
            </ExportSettings>
            <ClientSettings EnablePostBackOnRowClick="True" AllowDragToGroup="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="odsEvals"  CommandItemDisplay="Top" >
<CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToCsvButton="True"
        ShowExportToExcelButton="True" ShowExportToPdfButton="True"
        ShowExportToWordButton="True" ShowAddNewRecordButton="False"
        ShowRefreshButton="False"></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="ID" DataType="System.Int32"
            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"  Visible="false"
            SortExpression="ID" UniqueName="ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EmployeeID"
            FilterControlAltText="Filter EmployeeID column" HeaderText="Employee ID"
            SortExpression="EmployeeID" UniqueName="EmployeeID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EmployeeName"
            FilterControlAltText="Filter EmployeeName column" HeaderText="Employee Name"
            SortExpression="EmployeeName" UniqueName="EmployeeName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DateCompleted" DataType="System.DateTime"
            FilterControlAltText="Filter DateCompleted column" HeaderText="Completed"
            SortExpression="DateCompleted" UniqueName="DateCompleted">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CoreValueNos" DataType="System.Int32"
            FilterControlAltText="Filter CoreValueNos column" HeaderText="Core Value No's"
            SortExpression="CoreValueNos" UniqueName="CoreValueNos">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OtherNos" DataType="System.Int32"
            FilterControlAltText="Filter OtherNos column" HeaderText="Other No's"
            SortExpression="OtherNos" UniqueName="OtherNos">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EmployeeCostCenter"
            FilterControlAltText="Filter EmployeeCostCenter column"
            HeaderText="Cost Center" SortExpression="EmployeeCostCenter"
            UniqueName="EmployeeCostCenter">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>

Darren
Top achievements
Rank 2
 answered on 31 Jul 2012
1 answer
50 views
I have a tabstrib and multiview.   Each Pageview ahs a seperate user control.  Several have radgrid on them with an edit column.   When the user clicks edit.  the page postbacks and after the page refreshes the control for multiview with tabindex of 0 is displayed.   TO get back to original tab you need to click another tab then back to originating tab with radgird.   When it is displayed,  the tab is blank.   WHat do I need to do to get the edit to work?
Ivan Zhekov
Telerik team
 answered on 31 Jul 2012
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?