Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
648 views
I know

rg.SelectedItems[0].OwnerTableView.DataKeyValues[rgScheduleList.SelectedItems[0].ItemIndex][

"SCHEDULE_ID"]

 

 will get the value for the datakey on the grid, how about none data key item text? like name field on the grid?

Thanks!
JJ
Top achievements
Rank 1
 answered on 16 Jul 2010
2 answers
194 views
Hello,

I'm having a problem with padding for one of my RadComboBoxes.  I have a custom skin that is embedded in a .dll.  I have 3 RadComboBoxes in total.  Two don't have an ItemTemplate these are functioning correctly.  The one that does use an ItemTemplate is having a problem with the bottom border (see attachment).  It seems that the problem is created when I set the background color of the ComboBox in my PreRender event.  The problem only occurs in Firefox 3.6.* browsers.  IE (all versions), Chrome and Safari have no problem rendering the ComboBox correctly. 

We're using RadControls for ASP.NET AJAX Q3 2009 SP1

My cboProblemCombo_PreRender event (below).

protected void cboProblemCombo_PreRender(object sender, EventArgs evt)
{
   cboProblemCombo.BackColor = System.Color.Blue;          
}


Using Firebug I was able to find the css that was causing the problem (below).

.RadComboBox .rcbInputCell .rcbInput {
background:none repeat scroll 0 0 transparent;
border:0 none;
outline:0 none;
padding:2px 0 1px;
vertical-align:middle;
width:100%;
}

After adjusting the padding directly in Firebug by setting the padding: 0 the ComboBox rendered correctly with the bottom border showing up.  I've attempted to modify the custom skin css to correct the padding but it gets overridden by the above class.  In Firebug, I can see where my custom css is being scratched/crossed out.

I've attempted using the EnableEmbeddedBaseStylesheet="false" property on the ComboBox as well as attempting to override the base (default) stylesheet.

Any ideas?

Attached are snapshots of the problem and the desired look.

Thanks for the Help,
Allen
Allen Smothers
Top achievements
Rank 2
 answered on 16 Jul 2010
5 answers
123 views
I am not sure how to add a background image to a legend dynamically.  But I tried to the following without success:

        protected void rcOvernightByHHour_PrePaint(object sender, EventArgs e)
        {
            foreach (Telerik.Charting.LabelItem legend in rcOvernightByHHour.Legend.Items)
            {
                legend.Appearance.FillStyle.FillSettings.BackgroundImage = "C:\\images\\networks\\" + legend.Name + ".jpeg";

            }
        }



Ves
Telerik team
 answered on 16 Jul 2010
2 answers
517 views
Hi,

I am looking for a component that allows to edit XML files, if possible, with syntax highlight.
Can RadEditor do this job ?

Thanks
Cedric
Top achievements
Rank 1
 answered on 16 Jul 2010
7 answers
177 views

My RadGrid is setup to perform bulk edits, and that is all working well.  So this works great:
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) {

 

 

if (e.CommandName == "UpdateAll") {

 

    SaveTableData(e);

}

I'm preforming the Update/Insert like this:
foreach (GridEditableItem editedItem in RadGrid1.EditItems) {

 

 

    Hashtable newValues = new Hashtable();

 

 

    //The GridTableView will fill the values from all editable columns in the hash

 

 

 

    e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
}

 

 

 

However, when i add Paging to the mix, then the updates/inserts of the data are lost.  That is, if the user enters in all their data, and then forgets to Save their data and instead moves to the next page of the bulk edit table, then the data they entered is lost.

So I aded this function to try to fix that:
protected void RadGrid1_PageIndexChanged(object source, GridCommandEventArgs e) {

 

    SaveTableData(e);

}
But this 'e' does not have the user's new data that they entered in.
Why does the 'e' not have the new values?

jon
Top achievements
Rank 1
 answered on 16 Jul 2010
2 answers
127 views
Hey All,

I am running into a few issues when I try to use required field validators on the radnumerictext box. On the actual form that I was trying to develop I have several RadNumericTextBox controls that the user must at least touch in order for the form to be valid. To make it more convenient I have used JQuery (and tried straight javascript) to set the textbox's value to 0 if the user tabs out with out entering anything. The problem I am having is that the RequiredFieldValidator's do not seem to recognize that there is a number in the rad numeric text box unless I actually press 0. I have tried this with a regular asp.net text box and it works. It also works with the rad numeric text box in Firefox & Chrome. I have created a simplified asp .net page. The customAttribute="hiddenSection3" on the RadNumericTextBox and the hidden fields at the bottom are just there so the Utils.js doesn't throw an error. I have also tried it with out the customAttribute and the result is the same.

Thanks in advance


I have the following page: 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="IETester.aspx.vb" Inherits="IETester" %>
 
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
 
<%@ 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">
 
<head runat="server">
    <title>Untitled Page</title>
    <link type="text/css" rel="Stylesheet" href="css/chrome.css" />
    <script language="javascript" type="text/javascript" src="scripts/jquery-1.4.1.js"></script>
    <script language="javascript" type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
    <script language="javascript" type="text/javascript" src="scripts/jquery-1.4.1-vsdoc.js"></script>
    <script language="javascript" type="text/javascript" src="scripts/Utils.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
     
        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" customAttribute="hiddenSection3"  CssClass="numeric" NumberFormat-DecimalDigits="0">
        </telerik:RadNumericTextBox>
         
        <asp:Button ID="Button1" runat="server" Text="Button" />
         
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" Display="Dynamic" ControlToValidate="RadNumericTextBox1"></asp:RequiredFieldValidator>
         
       <%-- <telerik:RadInputManager ID="RadInputManager1" runat="server">
             
            <telerik:NumericTextBoxSetting Type="Currency" BehaviorID="Setting2" Validation-IsRequired="true" EmptyMessage="Error" ErrorMessage="Error" Validation-ValidateOnEvent="All" >
                <TargetControls>
                    <telerik:TargetInput ControlID="RadNumericTextBox1" Enabled="true" />
                </TargetControls>
            </telerik:NumericTextBoxSetting>
           
        </telerik:RadInputManager>
        --%>
          <input type="hidden" id="hiddenIdentified" value="0" />
    <input type="hidden" id="hiddenPrevious" value="0" />
    <input type="hidden" id="hiddenTotal" value="0" />
    <input type="hidden" id="hiddenSection1" value="0" />
    <input type="hidden" id="hiddenSection2" value="0" />
    <input type="hidden" id="hiddenSection3" value="0" />
    </div>
    </form>
</body>
</html>
Eazy
Top achievements
Rank 1
 answered on 16 Jul 2010
7 answers
856 views

I have a problem with adding custom attributes to menuitems. They can be added in code behind (I have tested the attribute count and contents) but do not show up in the html markup client-side. Custom CSS classes are added without a problem.

I have tried two ways of adding custom attributes to the menuitems
-databinding
-manual build of the menu

In the attached file I have added an aspx page with code to illustrate the issue.

http://www.cipsoftware.nl/downloads/telerik%20menutest%202010-07-13.zip

Did I forget a property or setting?

Additional info: I am using version 2010 q2 beta build 623 but I have the same problem with version 2009 q3 1314 and al versions in between.

Kind regards,

Edwin Dirkzwager
CIP Software BV
The Netherlands
Edwin
Top achievements
Rank 1
 answered on 16 Jul 2010
3 answers
380 views
Hi,

I am using a RadTabStrip on an ASP.Net page, which has 4 tabs. Each of these tabs contain different user controls which in turn contain other web user controls. I have place the entire RadTabStrip and its corresponding RadMultipage in one panel. Now when any event gets fired from a grid of the user control in any of the tabs, it does not display a Loading panel; although the events fire properly and the page is updated.

On this page, there is a RadGrid which gets updated by an event from the user control (which is in a RadMultipage), and the grid in turn updates other user controls which are in other tabs and RadMultipages.

Note that the usercontrols are not added dynamically, they exist when the page is loaded. RadTabStrip, RadTab and multipage controls are placed in either asp:panels or div. So giving the controls another dynamic IDs does not seem to work.

Also, the page uses an AjaxManagerProxy control since the AjaxManager itself is used in the master page. Because it uses an AjaxManagerProxy control, I cannot explicitly display the loading panels through JavaScript since I cannot find OnRequestStart and OnResponseEnd in the proxy control's client settings.

Can you please guide me with an alternative way of achieving this? Or if I am missing something? I am not sure whether to keep the tab content in a seperate panel and give that ID in "UpdatedControl" in the Ajax Settings or give the entire panel as the "UpdatedControl". I've tried both: functionalities work in both cases but loading panel gets displayed in none.

Please help,

Thanks in advance

Kunal Vora
Software Developer
Logica UK Ltd.
London, England
Lenny_shp
Top achievements
Rank 2
 answered on 16 Jul 2010
3 answers
411 views
I'm having trouble re- DataBinding a combobox on a button click event.  On the initial page load I'm binding the combobox (this works fine) which holds report settings.  I'm allowing the user to type in a value on the combobox which enables a save link button.  When the user clicks on the link button, I save all the report criteria off to the database and want to DataBind the combobox so show the newly added Item to the list.  I've debugged the process and show that the new item is getting saved off to the database,  the database is returning all items (including newly added).  It also appears that new item is getting bound to the combobox but it does not display in the browser.

Aspx:
                <table border="0" cellpadding="0" cellspacing="0" style="background-color:White;">              
                <tr> 
                    <td style="padding-right:5px;"><asp:LinkButton ID="lnkbtnSave" runat="server" Enabled="false" OnClick="lnkbtnSave_Click">Save</asp:LinkButton></td>  
                    <td style="padding-right:5px;"><asp:LinkButton ID="lnkbtnSaveAs" Enabled="false" runat="server" OnClick="lnkbtnSave_Click">Save As...</asp:LinkButton></td>  
                    <td><telerik:RadComboBox ID="rcbRptSettings" runat="server" AllowCustomText="true" EmptyMessage="My Reports" LoadingMessage="Loading..." OnSelectedIndexChanged="rcbRptSettings_SelectedIndexChanged" AutoPostBack="true" Skin="Outlook" Width="250px"></telerik:RadComboBox></td>  
                    <td style="padding-left:5px;"><asp:LinkButton ID="lnkbtnDelete" runat="server" OnClientClick="return blockConfirm('Are you sure you want to delete this report?', event, 330, 100,'','AARates Delete My Report');" OnClick="lnkbtnDelete_Click" Enabled="false">Delete</asp:LinkButton></td>  
                </tr> 
                </table> 

Code behind:
        protected void Page_Load(object sender, EventArgs e)  
        {  
    
            if (!Page.IsPostBack)  
            {  
                BindSavedSettings(Master.loggedUser.UserReports);  
            }  
 
                              
        }  
 
        private void BindSavedSettings(List<UserReport> urReports)  
        {  
            rcbRptSettings.DataSource = urReports; //Master.loggedUser.UserReports;  
              
            rcbRptSettings.DataTextField = "Name";  
            rcbRptSettings.DataValueField = "UserReportID";  
            rcbRptSettings.DataBind();  
            rcbRptSettings.Items.Insert(0, new RadComboBoxItem("", ""));  
 
        }  
 
        protected void lnkbtnSave_Click(Object sender, EventArgs e)  
        {  
            //Saves existing report  
            bool settingsfound = false;  
            UserReport ursettings;  
            PgMessage.ClearMessages();  
 
            if (rcbRptSettings.Text != string.Empty)  
            {  
                //USED FOR GRID SETTINGS  
                //string grsettings = string.Empty;  
                //GridSettingsPersister persister = new GridSettingsPersister(ARGrid1);  
                //grsettings = persister.SaveSettings();  
 
                foreach (UserReport ur in Master.loggedUser.UserReports)  
                {  
                    if (ur.Name == rcbRptSettings.Text)  
                    {  
                        settingsfound = true;  
                    }  
                }  
                if (settingsfound)  
                {  
                    ursettings = UserReport.getByKey(Convert.ToInt32(rcbRptSettings.SelectedValue));  
                    SaveReportSettings(ursettings);  
                }  
                else  
                {  
                    //NEW Report Settings
                    ursettings = new UserReport();  
                    SaveReportSettings(ursettings);  
 
                    List<UserReport> urpt = UserReport.getByUserid(Master.loggedUser.Userid);  
                    BindSavedSettings(urpt);  //BindSavedSettings to add new report setting  
 
                }  
            }  
            else  
            {  
                PgMessage.DisplayMessage(PageMessage.MessageType.Information, "Report Setting name must be entered");  
            }  
 
 
        } 
Velmurugan
Top achievements
Rank 1
 answered on 16 Jul 2010
3 answers
388 views
Hi Telerik,

I have a radtreeview which is dynamically binded to database. Following is the table structure:

AreaId | ParentAreaId | AreaName | IsRoomLevel | IsExpanded

1. When the treeview is generated, I want to assignment the "OnNodeClick" event only to the nodes whose attribute IsRoomLevel = 'True', i.e. not all the nodes can trigger the OnNodeClick event. How to achieve this?

2. When the "OnNodeClick" event is on, the nodes cannot be double clicked to expand or shrink because the page will refresh when the node is clicked.

3. I want to save the status of the treeview, i.e. the expend status of each node. But it is not efficient if I save the status of all the nodes to the database every time the their status are changed.

Any suggestions for these three questions? Thanks!

Best regards,
Hank
Nikolay Tsenkov
Telerik team
 answered on 16 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?