Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views

Requirements

RadControls version

2008.1 415 + (used since)

.NET version

2.x, 3.x

Visual Studio version

2005/2008

programming language

C#

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION 
The sample code demonstrates a Localization of RadGrid.
This sample shows Turkish Localization (tr-TR) for
  • Drag Drop
  • Pager
  • Grouping
  • General (Hierarchy,GridTableView)
  • Sorting
  • StatusBar
  • CommandItem
  • Filter

With this Code place insert a single line in masterpage codebehind RadControlUtility.GridBind(Page); it will change localization of all placed grids in page.
Sebastian
Telerik team
 answered on 14 Jan 2009
1 answer
70 views
Hi ,

I am using RadGrid in my code, i am trying to add color to a label in Radgrid.
On itemDatabound event  i have the following code:
protected void GrdAlertList_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
((e.Item as GridItem).FindControl("lblAlertColor") as System.Web.UI.WebControls.Label).BackColor = ColorTranslator.FromHtml(item.Color.ToString());
                         }
              }

This works fine in IE and color will be displayed, but  color is not rendered in case of Mozilla firefox ?
Plese let me know the solution for this
Daniel
Telerik team
 answered on 14 Jan 2009
1 answer
110 views
I am using the latest dev build to get around another issue that the input manager is having, but when i try to save my form i get a message saying

Error: Sys.InvalidOperationException: Component 'SharedCalendar' was not found.

but the calendar is at the top of the page.  the controls that use the calendar are not visible though,

<telerik:RadCalendar ID="SharedCalendar" runat="server" EnableMonthYearFastNavigation="False"
        EnableMultiSelect="False" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
        Skin="Default">
    </telerik:RadCalendar>
Iana Tsolova
Telerik team
 answered on 14 Jan 2009
1 answer
115 views
I have multiple pages with RAD Grids on each. I want to have a centralized stylesheet for all these GRIDs so that I do not have to format the style for each grid on different pages. Is this possible ?
If yes, please let me know how.

Cheers!!
Nitin
Princy
Top achievements
Rank 2
 answered on 14 Jan 2009
1 answer
118 views
Hi All,
Using VS2008 C# with Q3 2008 Telerik controls.
I am having an issue with the scheduler when in read-only in month view.
What is happening is that when I double click on a word in the displayed appointments in month view, the word first highlights, then disappears!
Has anyone had a similar problem?  Or a fix?

My definition is as follows :
<telerik:RadScheduler ID="RadScheduler1" runat="server" AllowDelete="False"   
        AllowEdit="False" AllowInsert="False" Culture="English (Australia)"   
        DisplayDeleteConfirmation="False" EnableAdvancedForm="False"   
        EnableRecurrenceSupport="False" EnableResourceEditing="False"   
        FirstDayOfWeek="Monday" HoursPanelTimeFormat="htt" LastDayOfWeek="Sunday"   
        OverflowBehavior="Expand" ProviderName="XmlSchedulerProvider1" ReadOnly="True"   
        SelectedView="MonthView" ShowViewTabs="False" Skin="Inox"   
        StartEditingInAdvancedForm="False" style="top: 0px; left: 0px; height: 500px"   
        ValidationGroup="RadScheduler1">  
    </telerik:RadScheduler> 

I am using an XML provider ripped straight from the examples and the population works correctly.
Thanks,
Jordan.
Peter
Telerik team
 answered on 14 Jan 2009
1 answer
106 views
We want to allow users to create recurring appointments, however we would like to disable the ability to edit a single occurrence of that recurring appointment. Is this possible?
Peter
Telerik team
 answered on 14 Jan 2009
3 answers
169 views
I've read other posts on the forums where people have received this error: "An Item with the same key has already been added".

In one post you said it was fixed, but I'm using the latest version 3.1125 for .NET 2.0 and I receive this error only when the CalculatedColumn is being used and I click on the Delete button.

My RadGrid is set up like this:
<telerik:RadGrid ID="grdExpenditure" runat="server" AutoGenerateColumns="False" Width="100%" 
        EnableEmbeddedSkins="False" PageSize="20" VirtualItemCount="20" Height="300px" 
        BackColor="#ACBCCC" ImagesPath="~/CSS/Grid" CssClass="SearchGrid"
        <MasterTableView AllowPaging="True" AllowSorting="True" ShowHeadersWhenNoRecords="True" 
            DataKeyNames="Expenditure_ID" TableLayout="Fixed"
            <Columns> 
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="Expenditure_ID" DataNavigateUrlFormatString="cClient_ExpenditureEdit.aspx?Expend_ID={0}" 
                    UniqueName="Select" Text="<img src='../images/edit.gif' style='border-style: none' alt='Select' />"
                    <ItemStyle Width="2%" HorizontalAlign="Center" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle Width="2%" HorizontalAlign="Center" /> 
                </telerik:GridHyperLinkColumn> 
                <telerik:GridBoundColumn DataField="NameAbbr" HeaderText="Prop." SortExpression="NameAbbr"
                    <ItemStyle HorizontalAlign="Left" Width="4%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Left" Width="4%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description"
                    <ItemStyle HorizontalAlign="Left" Width="16%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Left" Width="16%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Item" HeaderText="Expense Item" SortExpression="Item"
                    <ItemStyle HorizontalAlign="Left" Width="10%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Left" Width="10%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Category" HeaderText="Expense Category" SortExpression="Category"
                    <ItemStyle HorizontalAlign="Left" Width="16%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Left" Width="16%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridCheckBoxColumn DataField="IsCapitalExpense" HeaderText="Capital Exp" 
                    SortExpression="IsCapitalExpense"
                    <ItemStyle HorizontalAlign="Center" Width="5%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Center" Width="5%" /> 
                </telerik:GridCheckBoxColumn> 
                <telerik:GridBoundColumn DataField="VendorName" HeaderText="Vendor" SortExpression="VendorName"
                    <ItemStyle HorizontalAlign="Left" Width="10%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Left" Width="10%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="TransactionDate" DataFormatString="{0:MMM. dd yyyy}" 
                    HeaderText="Transaction Date" SortExpression="TransactionDate"
                    <ItemStyle HorizontalAlign="Center" Width="7%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Center" Width="7%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="TaxAmount" DataFormatString="{0:c}" HeaderText="Taxes" 
                    SortExpression="TaxAmount"
                    <ItemStyle HorizontalAlign="Right" Width="9%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Right" Width="9%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="TotalAmount" DataFormatString="{0:c}" HeaderText="Taxable Amount" 
                    SortExpression="TotalAmount"
                    <ItemStyle HorizontalAlign="Right" Width="9%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Right" Width="9%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridCalculatedColumn Aggregate="Sum" Expression="{0}+{1}" DataType="System.Decimal" DataFields="TotalAmount,TaxAmount" HeaderText="Total" DataFormatString="{0:c}" 
                    > 
                    <ItemStyle HorizontalAlign="Right" Width="9%" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle HorizontalAlign="Right" Width="9%" /> 
                </telerik:GridCalculatedColumn> 
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ImageUrl="~/images/delete.gif" 
                    ConfirmText="Are You Sure You Want To Delete The Selected Expenditure?" ConfirmTitle="Delete Expenditure?"
                    <ItemStyle Width="3%" HorizontalAlign="Center" BorderWidth="1px" BorderColor="#000000" 
                        BorderStyle="Solid" /> 
                    <HeaderStyle Width="3%" HorizontalAlign="Center" /> 
                </telerik:GridButtonColumn> 
            </Columns> 
            <AlternatingItemStyle BackColor="#ACBCCC" CssClass="mainInvoicingTextBlue " /> 
            <ItemStyle BackColor="#FFFFFF" CssClass="mainInvoicingTextBlue" /> 
            <HeaderStyle BackColor="#ACBCCC" CssClass="mainInvoicingTextBlue linkGoRentProBlue" 
                Height="20px" BorderWidth="1px" BorderColor="#000000" BorderStyle="Solid" /> 
            <PagerStyle Mode="NextPrevAndNumeric" BackColor="#394D6B" Font-Bold="True" CssClass="mainInvoicingTextWhite linkGoRentProWhite" 
                BorderWidth="1px" BorderColor="#000000" BorderStyle="Solid" PagerTextFormat="Page: {4} Total Records: {5}" 
                ShowPagerText="True" AlwaysVisible="True" /> 
            <FooterStyle BackColor="#394D6B" BorderWidth="1px" BorderColor="#000000" BorderStyle="Solid" 
                CssClass="mainInvoicingTextWhite" Font-Bold="True" /> 
        </MasterTableView> 
        <ClientSettings> 
            <Scrolling UseStaticHeaders="True" AllowScroll="True" SaveScrollPosition="False" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

And my DeleteCommand code looks something like this:
Protected Sub grdExpenditure_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grdExpenditure.DeleteCommand 
        Try 
            'hold expenditure id 
            Dim Expenditure_ID As Integer = Me.grdExpenditure.MasterTableView.DataKeyValues(e.Item.ItemIndex)("Expenditure_ID") 
 
            'delete the expenditure 
            If DeleteExpenditure(Expenditure_ID) > 0 Then 
                'alert success 
                 
                'rebind the grid 
                Me.grdExpenditure.Rebind() 
            Else 
                'alert failure 
                 
            End If 
        Catch ex As Exception 
             
        End Try 
    End Sub 

So in my delete command I just delete the selected Expenditure from the database and then force the grid to rebind its results.

I know its the calculated column because when I remove it the problem goes away. So I'm guessing this bug still exists or I'm doing something wrong.


Yavor
Telerik team
 answered on 14 Jan 2009
2 answers
168 views
Usually i populate the common DropDown list using the following code:

Dim installed_fonts As New InstalledFontCollection 
For Each family In FontFamily.Families 
    DropDownList1.Items.Add(family.Name) 
Next family 

For some reasons i cannot use the same code for RadCombobox.

Can you show me how do i populate it with the currently installed fonts ??

Thanks


El
Top achievements
Rank 1
 answered on 14 Jan 2009
4 answers
516 views
hy friends

 I am using a Date Time Column and I d like to set a default value to the datepicker. How Can i achive this?

Thanks a lot


carlos
Top achievements
Rank 1
 answered on 14 Jan 2009
1 answer
91 views
hi
I want the grid sorted by single column at default,but if user pressing 'ctrl' when sorting the grid will sort by Multi-column.
How do i implement that?
Yavor
Telerik team
 answered on 14 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?