Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views
How do you set the DisabledStyle for a ComboBox in Code Behind?

I tried this but it didn't work:
[ToolboxData("<{0}:RadComboBoxEx runat='server'></{0}:RadComboBoxEx>")]
public class RadComboBoxEx : RadComboBox
{
    public RadComboBoxEx()
        : base()
    {
        //this.DisabledStyle.BackColor = System.Drawing.Color.White;
        //this.DisabledStyle.ForeColor = System.Drawing.Color.LightGray;
        this.Init += new EventHandler(RadComboBoxEx_Init);
    }
 
    void RadComboBoxEx_Init(object sender, EventArgs e)
    {
        SetDisabledStyle(this.Controls);
    }
 
    private void SetDisabledStyle(ControlCollection controlCollection)
    {
        foreach(Control control in controlCollection)
        {
            if ( control is RadInputControl )
            {
                RadInputControl input = (RadInputControl)control;
 
                input.DisabledStyle.BackColor = System.Drawing.Color.White;
                input.DisabledStyle.ForeColor = System.Drawing.Color.LightGray;
            }
            else
            {
                SetDisabledStyle(control.Controls);
            }
        }
    }
Nencho
Telerik team
 answered on 15 Mar 2013
1 answer
502 views
Hi,
I using VS2012. I am using a telerik radgrid and binding the grid to customer information in a dataset(single dataset). A single customer can have many records in the dataset. Hence in my grid i want to have my first column as a expand-collapse button '(+)' column. If a single customer is getting repeated in the dataset (which i get to know from the 'customer name' column and thier unique 'customer ID' column in the dataset), i want to  display the (+) expand button, on click of expand i want to display the other records for this same customer, and on clicking collapse(-) button i want to show only one record for that customer. If the customer name is unique in the dataset then i dont want to display the expand-collapse button in the first column. Is there any way to do this ? Kindly help. Thanks in Advance.
Marin
Telerik team
 answered on 15 Mar 2013
1 answer
67 views
Hi,
How can I Show Hide properties in Set Image Properties Dialog?

Thanks,
Amr Saafan
Rumen
Telerik team
 answered on 15 Mar 2013
4 answers
173 views
I have a RadCombox bound to sql datasource with some dropdown items. There is one column called "Other". I want when users select the other, it enable a corresponding RadTextbox so they can input an item and on save button click the item get save to the other column in the database. Any example?
Ebenezer
Top achievements
Rank 1
 answered on 15 Mar 2013
5 answers
132 views
how to open popup box in orgchart drill option ? from database ?
Plamen
Telerik team
 answered on 15 Mar 2013
1 answer
166 views
I have a paged radGrid with SaveScrollPosition="true".  This way if they scroll left/right and page, the horizontal scroll position is saved which is what I want (there is a flicker/refresh where the columns jump left/right but that's another issue for later).

However, If I issue a more refined search and a new result set,  I want to reset the page back to page 1 (I'm setting CurrentPageIndex = 0 which works).  However, I also want move the horizontal postion back to the starting point.  How do I do that.  It seems to be a client-setting but I'm not sure how.

Thanks, Dave

David
Top achievements
Rank 1
 answered on 15 Mar 2013
3 answers
111 views
hi there,
i using RadComboBox and RadTreeView together. i use the AjaxPanel in RadComboBox's itemtemplate but also and  sometimes on some forms of our projects that Which has been used Master AjaxPanel , we face with this JS Error!!!

Error: Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Script control 'SimpleTreeDownTree' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl
Source File: http://localhost:2518/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=...

is there any idea use inner AjaxPanel inside master Ajax panel that have not conflict together?
          
<telerik:RadComboBox ID="SimpleTreeDownItems" runat="server" Height="255px" Width="420px"
               AllowCustomText="true" EmptyMessage="Select Anythings" ToolTip="Select" Style="vertical-align: middle;"
               OnDataBound="SimpleTreeDownItems_DataBound" OnPreRender="SimpleTreeDownItems_PreRender" OnClientDropDownOpened="SimpleTreeDownItems_OnClientDropDownOpenedHandler" >
               <collapseanimation duration="400" type="inback" />
               <expandanimation duration="400" type="inback" />
               <itemtemplate>
                       <div   class="TreeViewWrapper" onclick="StopPropagation" >
                   <telerik:RadAjaxPanel runat="server" ID="SlaveAjaxPanel" >
                        <telerik:RadTreeView OnNodeDataBound="SimpleTreeDownTree_NodeDataBound" runat="server"
                            ID="SimpleTreeDownTree" OnNodeClick="NodeClicking" Width="411" Height="252" style="overflow-x:hidden; overflow-y:auto"  >
                           <Nodes>
                           </Nodes>
                       </telerik:RadTreeView>
                       </telerik:RadAjaxPanel>
                   </div>
               </itemtemplate>
               <expandanimation type="InBack"></expandanimation>
               <items>
                     <telerik:RadComboBoxItem Text="" />
               </items>
               <collapseanimation type="InBack"></collapseanimation>
           </telerik:RadComboBox>




Maria Ilieva
Telerik team
 answered on 15 Mar 2013
3 answers
400 views
I'm switching a web page over from using the GridView control to using the RadGrid control.  One thing I'm stuck on is how to right-indent text in an item.

As you'll see in the first screenshot, the illustrated column is correctly indented.  I did this very simply with this CSS Class:

.indentRight {padding-right:20px}

However, that no longer seems to have any effect in the RadGrid.  I tried changing several things but to no avail.  Here's the markup code in question:

              <telerik:GridBoundColumn DataField="TaskStdHours" HeaderText="Std Hours" ReadOnly="true" SortExpression="TaskStdHours" DataFormatString="{0:F2}"><br>                <HeaderStyle Width="70px" HorizontalAlign="Center" /><br>                <ItemStyle HorizontalAlign="Right" CssClass="indentRight" /><br>              </telerik:GridBoundColumn><br>

What do I need to do to make it look the same as in the GridView?

Robert W.

Kostadin
Telerik team
 answered on 15 Mar 2013
1 answer
223 views
Hi,
Can we use RadFormDecorator to decorate HTML table. Or is there any alternative to apply css to table similar like RadGrid?
Bozhidar
Telerik team
 answered on 15 Mar 2013
2 answers
132 views
I have a field in my grid for an email address.  I would like to add a regular expression validator to ensure the format.  Currently I have a required field validator which works but is not sufficient.  I've searched but haven't found a working example.

I also have a date field and would like to set a valid range validator to it but I need to set the min/max values from my code behind file.  I have managed to set the min/max date of the editor using the ItemDataBound event as a work around but would like to know if this is possible.

Thanks.
J
Top achievements
Rank 1
 answered on 15 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?