Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
I have a screen that has numerous rag grids on it.
.RadGrid
{
    border-radius: 10px;
    overflow: hidden;
}

This code works great it rounds all the grids, but I would like to control which grids are rounded.  I have a few hierarchical grids and I do not ant the inner grid to have rounded corners

This code is in my main site.css and I want to keep it there.  I have tried #name but that is not the most ideal nor did it work.  I would like to add a cssclass name to the grids that I want the rounded corners on.
Eric Klein
Top achievements
Rank 1
 answered on 20 Nov 2013
0 answers
79 views
I am currently using windows 7 visual studio 2010 and telerik controls 2013.2.717.40.  I have created a custom skin but when I apply it I lose the Expand and Collapse icon on the grid.  I decided to use a stock skin outlook and then change the icons but when I add the icon url it still shows the standard right arrow.

Are you no longer able to alter the icon and if you use a custom screen whey does the icon disappear?
Eric Klein
Top achievements
Rank 1
 asked on 20 Nov 2013
3 answers
141 views
Hi,

I have placed a table in an edit form that contains validation on several textboxes. I'm trying to make the validation message to be right in the cell that contains the textbox.  It seems like if I'm doing soemthing like the code below in my ItemCommand event, the message would be in the "outer" table cell.  How do I access the table cell that's in the table within the <FormTemplate>?
<EditFormSettings EditFormType="Template">
    <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
    </EditColumn>
    <FormTemplate>
        <table class="auto-style1" border="2" >
            <tr>
                <td style="width:8%">Building Name:</td>
                <td style="width:8%">
                    <asp:TextBox ID="bldgname" runat="server" MaxLength="40" >                                 
                    </asp:TextBox>
                </td>
                <td style="width:8%">Column3</td>
                <td style="width:100%">Column4</td>
            </tr>
            <tr>
                <td>Address:</td>
                <td>
                    <asp:TextBox ID="address1" runat="server" Text='<%# Bind("bldgstreet1") %>'></asp:TextBox><br />
                    <asp:TextBox ID="address2" runat="server" Text='<%# Bind("bldgstreet2") %>'></asp:TextBox><br />
                </td>
                <td> </td>
                <td> </td>
            </tr>
            <tr>
                <td>City:</td>
                <td>
                    <asp:TextBox ID="bldgcity" runat="server" Text='<%# Bind("bldgcity") %>'></asp:TextBox><br />
                </td>
                <td> </td>
                <td> </td>
            </tr>
            <tr>
                <td>State:</td>
                <td>
                    <asp:TextBox ID="bldgstate" runat="server" Text='<%# Bind("bldgstate") %>'></asp:TextBox><br />
                </td>
                <td> </td>
                <td> </td>
            </tr>
            <tr style="width:5%; height:50px">
                <td>Zip:</td>
                <td>
                    <asp:TextBox ID="bldgzip" runat="server" Text='<%# Bind("bldgzip") %>'></asp:TextBox><br />
                </td>
                 
                <td>
                    <div>
                        <table width="100%">
                          <tr>
                            <td style="width:30%">
                                <asp:ImageButton ID="CertifyAddressImageButton" runat="server" ImageUrl="~/images/certificate32.png" OnClick="CertifyAddressImageButton_Click"/>
                            </td>
                            <td style="width:70%">
                                <asp:CheckBox ID="CheckBoxOverride" runat="server" Text="Override?" TextAlign="Left" Font-Size="Large" />
                            </td>      
                          </tr>
                         </table>
                     </div>
                </td>
                <td>
                   <telerik:RadComboBox ID="WireCenterRadComboBox" Runat="server" Height="200px" Width="200px" DropDownWidth="750px"
                        HighlightTemplatedItems="True" MarkFirstMatch="True"
                        EnableLoadOnDemand="True" Filter="StartsWith" EmptyMessage="Enter WireCenter Name..." ToolTip="Enter WireCenter Name to Filter list"
                        OnItemsRequested="WireCenterRadComboBox_ItemsRequested" OnLoad="WireCenterRadComboBox_Load">
                        <HeaderTemplate>
                            <table style="width: 700px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 80px;">WireCenter</td>
                                    <td style="width: 150px;">Name</td>
                                    <td style="width: 150px;">T1OrderMethod</td>
                                    <td style="width: 100px;">Vendor ACTL</td>
                                    <td style="width: 170px;">Logix ACTL</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="width:700px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 80px;"><%# DataBinder.Eval(Container, "Text")%></td>
                                    <td style="width: 150px;"><%# DataBinder.Eval(Container, "Attributes['wirecentername']")%></td>
                                    <td style="width: 150px;"><%# DataBinder.Eval(Container, "Attributes['t1ordermethod']")%></td>
                                    <td style="width: 100px;"><%# DataBinder.Eval(Container, "Attributes['vendoractl']")%></td>
                                    <td style="width: 170px;"><%# DataBinder.Eval(Container, "Attributes['logixactl']")%></td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                </td>
                 
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                    </asp:Button>
                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                </td>
                <td> </td>
                <td> </td>
                <td> </td>
            </tr>
        </table>
    </FormTemplate>
</EditFormSettings>

if (e.CommandName == RadGrid.UpdateCommandName ||
    e.CommandName == RadGrid.PerformInsertCommandName)
{
    GridEditableItem item = e.Item as GridEditableItem;
    // Validate Zip Code
    RegularExpressionValidator validZip = new RegularExpressionValidator();
     
 
    // for Accessing boundcolumn
    GridTextBoxColumnEditor editor;
 
    // Test zip
    TextBox txtbx;
    TableCell cell;
 
    txtbx = (TextBox)item.FindControl("bldgzip");
    cell = ((GridEditFormItem)txtbx.NamingContainer).EditFormCell;
    validZip.ControlToValidate = txtbx.ID;
    validZip.ErrorMessage = "only [0-9] and '-' are allowed";
    validZip.ValidationExpression = @"^\d{5}(-\d{4})?$";
    validZip.ForeColor = System.Drawing.Color.Red;
    cell.Controls.Add(validZip);
    // End Test Zip
 
    validZip.Validate();
  }

Helen
Top achievements
Rank 1
 answered on 20 Nov 2013
3 answers
101 views
When any PostBack occurs (in this case, I am using a RadAjaxManager) and the PivotGrid is inside a UserControl.  I can find no other explanation for this because as soon as I take off the PivotGrid (there is also another RadGrid in the UserControl) everything works just fine.  The other thing is that the PivotGrid is inside of a RadPageView.

The error is:
"Unable to get value of the property 'style': object is null or undefined"

The problem lies in the "_initializeHzScrollDiv" method which does not account for a null result from "this.get_hzScrollDiv":
var l=this.get_hzScrollDiv(); <-- Error occurs later becuase this returns Null...
var p=$telerik.isIE?a.PivotGrid.GetScrollBarWidth()+1:a.PivotGrid.GetScrollBarWidth();
l.style.width=q.clientWidth+"px";
l.style.height=p+"px";
l.style.overflowX="scroll";
l.style.overflowY="hidden";
Tim
Top achievements
Rank 1
 answered on 20 Nov 2013
1 answer
61 views
I am using RadEditor for content editing. I have set its content programmatically like 

RadEditor1.Content = Conversion.ToString(Cms.HtmlContent);

But it's not loading contents and the RadEditor also is disabled.

Any help will be appreciated.

Thanks
Ianko
Telerik team
 answered on 20 Nov 2013
11 answers
298 views
Hi,
I have a header control in my RadGrid set out as:

<

 

 

telerik:GridBoundColumn DataField="RaisingFactor" HeaderText="Raising Factor" UniqueName="RaisingFactor" ReadOnly="true" Visible="true" DataFormatString="{0:N2}"></telerik:GridBoundColumn>

 


I wish to re-set the value of the text of this control after the Update has been made on the row that it belongs to.

Its a field that is calculated based on the values of 3 other fields. I wish the new value of this header to display straight after Update.

Any advice?

Thank you.
Kostadin
Telerik team
 answered on 20 Nov 2013
5 answers
112 views
Hi there,

I have a single instance of RadEditor on a page which I am using for text entry of multiple fields by moving in the DOM.
All works fine except when I have EnableTrackChanges set to false I notice a significant delay between text entry and text appearance on the screen. I don't think I can have EnableTrackChanges flag on for my requirement. Can you please assist me to avoid that delay without setting EnableTrackChanges flag?

Thank you.
Ianko
Telerik team
 answered on 20 Nov 2013
1 answer
77 views
Assuming "Date" is of type DateTime, I know it's possible to do the following:

<telerik:GridGroupByExpression>
     <SelectFields>
         <telerik:GridGroupByField FieldName="Date" />
     </SelectFields>
     <GroupByFields>
         <telerik:GridGroupByField FieldName="Date" SortOrder="Ascending" />
     </GroupByFields>
 </telerik:GridGroupByExpression>

I've replaced my DateTime property with a new custom class called MonthAndYear.

[Serializable]
protected class MonthAndYear : IComparable<MonthAndYear>
{
    public int Month { get; set; }
    public int Year { get; set; }
 
    public string monthString
    {
        get
        {
            return CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(Month);
        }
    }
 
    public MonthAndYear(int month, int year)
    {
        Month = month;
        Year = year;
    }
 
    public MonthAndYear(DateTime dateTime)
    {
        Month = dateTime.Month;
        Year = dateTime.Year;
    }
 
    public static MonthAndYear Now
    {
        get
        {
            return new MonthAndYear(DateTime.Now.Month, DateTime.Now.Year);
        }
    }
 
    public static MonthAndYear FromDate(DateTime date)
    {
        return new MonthAndYear(date.Month, date.Year);
    }
 
    public MonthAndYear AddMonths(int num)
    {
        DateTime tempDate = new DateTime(Year, Month, 1);
        tempDate = tempDate.AddMonths(num);
        return new MonthAndYear(tempDate.Month, tempDate.Year);
    }
 
    public MonthAndYear AddYears(int num)
    {
        int newYear = Year + num;
        return new MonthAndYear(Month, newYear);
    }
 
    public static bool operator >(MonthAndYear a, MonthAndYear b)
    {
        if (a.Year == b.Year)
            return a.Month > b.Month;
        else if (a.Year > b.Year)
            return true;
        else
            return false;
    }
 
    public static bool operator <(MonthAndYear a, MonthAndYear b)
    {
        if (a.Year == b.Year)
            return a.Month < b.Month;
        else if (a.Year < b.Year)
            return true;
        else
            return false;
    }
 
    public static bool operator >=(MonthAndYear a, MonthAndYear b)
    {
        return a > b || a == b;
    }
 
    public static bool operator <=(MonthAndYear a, MonthAndYear b)
    {
        return a < b || a == b;
    }
 
    public static bool operator ==(MonthAndYear a, MonthAndYear b)
    {
        return a.Month == b.Month && a.Year == b.Year;
    }
 
    public static bool operator !=(MonthAndYear a, MonthAndYear b)
    {
        return !(a.Month == b.Month && a.Year == b.Year);
    }
 
    public override bool Equals(object obj)
    {
        if (obj == null)
        {
            return false;
        }
        MonthAndYear m = obj as MonthAndYear;
        if ((System.Object)m == null)
        {
            return false;
        }
 
        return this.Month == m.Month && this.Year == m.Year;;
    }
 
    public override string ToString()
    {
        return new DateTime(Year, Month, 1).ToString();
    }
 
    public override int GetHashCode()
    {
        int hash = 23;
        hash = hash * 31 + Month.GetHashCode();
        hash = hash * 31 + Year.GetHashCode();
        return hash;
    }
 
    public int CompareTo(MonthAndYear other)
    {
        if (this < other) return -1;
        if (this == other) return 0;
        return 1;
    }
}

Now when I try to group by Date, I get an IndexOutOfRange exception that says "Cannot find column Date." If I remove the GridGroupByExpression, everything works just fine minus the fact that my data isn't grouped by Date. Is there a way to use custom objects in RadGrid's grouping functionality? Or at least a way to mimic grouping by DateTime?   
Konstantin Dikov
Telerik team
 answered on 20 Nov 2013
7 answers
278 views

Can someone tell me how to set default "target" property to "New Window" in Document Manager Dialog of RadEditor ?  ( Currently default target is “None” ).  I don't want to do this way http://www.telerik.com/community/forums/aspnet/editor/document-link-deafult-target-blank.aspx .  

Ianko
Telerik team
 answered on 20 Nov 2013
21 answers
595 views
Hello,

I am using a RadEditor on it's own page and I want to be able to resize the Manager Dialog boxes that appear on the screen (Image Manager, File Manager, etc).

I have tried setting the DialogOpener.Window.Behaviors and DialogOpener.Window.InitialBehaviors in code behind and they don't seem to have any effect.  They also don't save in the ASPX page.

What can I do to allow for these dialog windows to be resizable?

I am using Q1 2009 beta.

Shawn
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 20 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
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
Iron
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?