Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
201 views
Greetings,

I was wondering if it is possible to set 2 background colors for sorted columns, one color for alternate rows and other for non-alternate rows, because for the moment I only found the property SortedBackColor in SortingSettings. 

I would like to achieve this to keep the alternate look and feel among rows even on sorted columns.

Thanks in advance for your help

Regards!
Oscar Rmz

Shinu
Top achievements
Rank 2
 answered on 30 May 2014
1 answer
324 views
Hi
I have a very simple requirement that I am pretty sure i have seen demo'ed in the past on the telerik site, but it seems to be gone. I have a grid, and Item templates, as well as EditItemTemplates for each column. One column's edit template is a radcombobox that has to have its datasource set in the code-behind. So, I have a, GridEditCommandColumn.

When I hit "Edit", the grid does not seem to recognize that it is in "Edit"mode. It comes back with the row as it was, uneditable, and the "Edit"button still showing (instead of the expected "Update, Cancel" buttons). Strangely enough, though, there is an edit form below the row that pops down, and it ha s some basic controls for editing, but they are not the edititemtemplate controls, as there are just textboxes, and no radcombobox. In this edit form, there is an update and cancel button. (As you can see in the screenshot, the weird edit form is there, with update and cancel buttons, but the inline row is still in regular mode, and the "edit" button is showing, which implies that the grid is not in edit mode!) I have set EditMode to "INPlace".

I just need simple inline editing - when I click "Edit", the grid should know that the row is in edit mode, and use the edititem template controls inline, as well as show "UPdate and Cancel " buttons. There should be no wierd edit form showing up below my row.

This seems like a super-simple thing to want to do, yet I cannot find a demo of this simple functionality. No demos show how to do in line editing with a radcombobox that has its data source set in ItemDataBound as I am doing.

Any help is appreciated. 

Thanks

Daniel
Shinu
Top achievements
Rank 2
 answered on 30 May 2014
4 answers
132 views
See thread title.
I have a couple of standalone RadImageAndTextTile's on a page. Even though I have specified 'tile.EnableSelection = false;' in code-behind, the tiles are still selectable via right-click.

Thx in advance for help and/or pointers!
M.

v.2013.3.1114.40
Princy
Top achievements
Rank 2
 answered on 30 May 2014
1 answer
134 views
The documentation for the RadButton accessibility states:
When ToggleType="CheckBox", "Radio" or "Link" and if the Text property is set, the Button compliance level is A.

But there is no ToggleType="Link" in the designer view, and if hard coded, results in the following error:

Cannot create an object of type 'Telerik.Web.UI.ButtonToggleType' from its string representation 'Link' for the 'ToggleType' property.

My code looks like this

<telerik:RadButton ID="btnOkay" ToggleType="Link" runat="server" CausesValidation="False" Text="Yes" OnClick="btnOk_Click" meta:resourcekey="btnOkayResource1" />

Currently, instead of reading the Text attributes of the RadButtons, NVDA will read "Paragraph" when focus is placed upon them.

Shinu
Top achievements
Rank 2
 answered on 30 May 2014
1 answer
164 views
I have read the various postings and suggestions regarding how to handle the scenario of having the loading panel show during the export process.

Using the suggestion manually showing and hiding the loading panel would work best, if I could execute javascript at the moment the file is presented to the user.  

Does the grid have an event (server or client) that can execute the moment the file is ready?  Or allow us to define an exportsetting for a javascript function to execute?

If these are not possible, please consider this as a suggestion.  

Thanks

Peter
Princy
Top achievements
Rank 2
 answered on 30 May 2014
1 answer
135 views
On click of the AddNewRecordButton, i want to hide button and the table header. On click of the addNewrecord, i can successfully hide the delete button on each row but the addNewRecord button still is visible! Also how can I hide the header?

I have a grid as follows. Add new record is a template.
          this._RadGrid1.ID = "RadGrid1";
        this._RadGrid1.Skin = "WebBlue";
        this._RadGrid1.Width = Unit.Percentage(100);
        this._RadGrid1.GridLines = GridLines.None;
        this._RadGrid1.AllowSorting = true;
        this._RadGrid1.AllowFilteringByColumn = false;
        this._RadGrid1.ShowGroupPanel = false;
        this._RadGrid1.AutoGenerateColumns = false;
        this._RadGrid1.AutoGenerateDeleteColumn = false;
        this._RadGrid1.AllowPaging = false;
        this._RadGrid1.EnableLinqExpressions = false;
        this._RadGrid1.MasterTableView.NoMasterRecordsText = "There are no documents associated with this order / quote / proposal.";      
        this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = false;
        this._RadGrid1.ClientSettings.EnableRowHoverStyle = true;
        this._RadGrid1.ClientSettings.EnablePostBackOnRowClick = false;
        this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._EntityDocumentumReferenceTable.EntityDocumentumReferenceIdColumn.ColumnName };           
 
        this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
        this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound;
        this._RadGrid1.ItemCommand += RadGrid1_ItemCommand;    
 
          if (ShowAdd)
        {
            this._RadGrid1.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true;
            this._RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;               
            this._RadGrid1.MasterTableView.CommandItemSettings.AddNewRecordText = "Add Document";                          
            this._RadGrid1.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.Template;
            this._RadGrid1.MasterTableView.EditFormSettings.FormTemplate = new AddDocumentTemplate(this._EntityId,
                       this._EntityType,
                       this._QuoteId,
                       this.CustomerNumber,
                       this.CompanyId,
                       this.ProposalNumber,
                       this.CatalogProductId);
        }
The ItemDataBound is as follows:
         private void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {        
           if (e.Item is GridDataItem)
           {            
               //Access the Insert Form, disable delete when in insert mode
              if (e.Item is GridEditableItem && !e.Item.IsInEditMode && e.Item.OwnerTableView.IsItemInserted)
              {
                  this._RadGrid1.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;                  
                  GridEditableItem insertItem = (GridEditableItem)e.Item;
                  ImageButton btnDelete = (ImageButton)dataItem["DeleteColumn"].Controls[0];
                  btnDelete.Visible = false;
                  //this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = false;
              }
           } 
       }
Princy
Top achievements
Rank 2
 answered on 30 May 2014
11 answers
1.6K+ views
Hi,

can you tell me  how to change radgrid selected item style? When I use the following css, it appears that there's a grey overlay and blow there's the red background i'm looking for. I attached a photo to give you an example.
.SelectedStyle
{
 background-color: red !important;
}
<telerik:RadGrid ID="grdClients" runat="server" Width="100%" AutoGenerateColumns="false"
       AllowMultiRowEdit="false" ShowHeader="false" DataSourceID="objClients"
           CssClass="RadGrid_Default" SelectedItemStyle-CssClass="SelectedStyle">

Thanks
Shinu
Top achievements
Rank 2
 answered on 30 May 2014
4 answers
447 views
Hello,
When my users click the buttons on the grid forms the form takes a while to close.  I suspect, the users are clicking the button again, or even clicking another button on the form that also closes the form. I'm seeing that they sometimes create duplicate records.  I've tried to disable the button in javascript but the form doesn't close.  It does a postback and comes back with the button enabled.
Is there a way to achieve disabling a few buttons and still have the normal behaviour?
Joan
Top achievements
Rank 1
 answered on 30 May 2014
4 answers
360 views
Hi,

I'm having the weirdest problem with the RadUpload control.
I was trying to integrate the control in a fairly complicated aspx page and got the following error from Visual Studio (9.0.etc.) when running the page in debug mode:
"Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element"
I tried to read up on this problem on the internet but couldn't make much sense of what is written on the subject.
So I decided to make a test page just for this control, following the instructions in the "RadControls for ASPNET AJAX Q1 2008 Documentation" (or at least for the larger part), to see how I could get it working.

And guess what? It worked!
So I started experimenting with renaming the uploaded file and stuff and it still worked. Up to a certain point...
The thing is I don't see what it was that caused a problem. To me it seems as if from one moment to the other it just stopped working.
Although the problem was not the same error. All of the sudden "rulMediaUpload.UploadedFiles[0]" became null all the time.

I grew tired of it yesterday so I dropped it for the day. This morning I decided to comment all lines but those with I think it was I started with when making the test page the first time, when it still worked. And now I'm stuck again with the "Value must not be null for Controls and Behaviors" error from Visual Studio...
I really can't see what the difference is between the code as it is this morning and yesterday morning (ignoring the commented lines) except that it did work yesterday!

This is the code in the aspx file:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadUploadTest.aspx.cs" Inherits="CMS.Views.Tests.RadUploadTest" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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

<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <!--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>-->
            <telerik:RadUpload runat="server"
                AllowedFileExtensions=".jpg,.jpeg,.gif,.png,.bmp,.aac,.mp3,.wav,.wma,.asf,.avi,.mov,.mp4,.mpg,.qt,.swf,.wmv"
                ControlObjectsVisibility="None" MaxFileInputsCount="1" MaxFileSize="5000000"
                TargetFolder="~\Upload\Media" ID="rulMediaUpload" />
            <!--<telerik:RadProgressManager ID="RadProgressManager1" Runat="server" />
            <telerik:RadProgressArea ID="RadProgressArea1" Runat="server" DisplayCancelButton="True" ProgressIndicators="TotalProgressPercent">
            </telerik:RadProgressArea>-->
                
            <asp:Button ID="Button1" runat="server" Text="submit" onclick="Button1_Click" />
        <!--</ContentTemplate>
        </asp:UpdatePanel>-->
    </div>
    </form>
</body>
</html>

And this is the code in the corresponding aspx.cs file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace CMS.Views.Tests
{
    public partial class RadUploadTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //string defaultTempFileName= Path.Combine(GetPathFromBase("Upload\\Media"),"xxx.jpg");
            //DateTime d = DateTime.Now;
            //string s = "" + d.Year + d.Month.ToString().PadLeft(2, '0') + d.Day.ToString().PadLeft(2, '0') + d.Hour.ToString().PadLeft(2, '0') + d.Minute.ToString().PadLeft(2, '0');
            //string FinalFileName= Path.Combine(GetPathFromBase("Upload\\Media"),"final-"+s+".jpg");
            //rulMediaUpload.UploadedFiles[0].SaveAs(defaultTempFileName);
            //FileInfo uploadedFile = new FileInfo(defaultTempFileName);
            //uploadedFile.MoveTo(FinalFileName);
        }
    }
}

In both files the commented lines didn't cause any problems when not commented until... they did!

Please help me out here.


Brian Kowald
Top achievements
Rank 1
 answered on 29 May 2014
1 answer
95 views
Dear All,

      In my page , i'm having one radtreeview with a tabsrip. in that tab i'm having some controls like lable , texbox and a button for save the details. Once i will click on "save" button the details will be insert into appropriate table and the data will be shown in the treeview. 

    Here my problem  is, that if i will save the details, i'm unable to refresh / bind data into the radtreeview which is in parent page(aspx) from the tabstrip page(aspx).

    Assist me that how to access parent controls from the tabstrip page????
Nencho
Telerik team
 answered on 29 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?