Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
51 views
When I try to insert flash video in RadEditor, it isn't shown in design mode.

To reproduse:
1. Open http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
2. Swich to html mode.
3. Insert:
<embed wmode="transparent" src="http://www.youtube.com/v/uz4_TAoX3uE&amp;hl=en_US&amp;fs=1&amp;rel=0" quality="high" bgcolor="#FFFFFF" name="Vermont" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="480" align="" height="250">


4. Swich to design mode.

Insted of video, in Firefox you will see static image.
Rumen
Telerik team
 answered on 13 Jan 2011
2 answers
134 views
<asp:Button ID="btnHidden" runat="server" style="display:none;" EnableViewState="false" /> 
I'm not sure if this is a bug in the CSS inheritance of the latest browsers or a bug in the radFormDecorator. The button listed above displays on the screen, even though the inline style should take precedence over all other styles. I'm using a workaround of putting "display:none" in a  CSS class which correctly hides the button (and prevents the radFormDecorator from rendering an anchor around the input element. I'm wondering if this is related to the "Opera hack" in the radFormDecorator's CSS file?
deval
Top achievements
Rank 1
 answered on 13 Jan 2011
5 answers
73 views
We have added a color picker Tool Item using teh following configuration:

 

<tool name="ApplyBackColor" type="dropdown" ItemsPerRow="10" popupheight="120px">
      <item  name="<img  src='./_wpresources/RadEditorSharePoint/5.4.1.0__1f131a624888eeed/Resources/ToolImages/colors/ffffff.png' alt='#'/>" value=""/>
      <item  name="<img  src='./_wpresources/RadEditorSharePoint/5.4.1.0__1f131a624888eeed/Resources/ToolImages/colors/000000.png' alt='#000000'/>" value="#000000"/>

But the performance is extremely slow. there are around 50 colors that we want to display, and each color icon takes about .5 seconds to load.

Kindly suggest some better solution or performance improvement idea?

Rumen
Telerik team
 answered on 13 Jan 2011
3 answers
66 views
Hello. I have broken down my problem into a very simple page and I'm sure the solution is simple as well. I do need to rebind the grid (not in this example but in my real scenario I do) and my question is why the Rate event is triggered a second time when rebinding the grid? I have already handled the Rate event, saved my rating to the database, and as a final step I want to rebind the grid so that some other data is updated, for example some average rating or something like that. (My grid template column is much more advanced in the real scenario with lots of controls that needs to be updated when a new rating has been saved).

I've played around alot with simple binding, advanced binding and all sorts of things but right now my example looks like below. Please tell me how to solve this.

Here is the Code Behind    
public void Page_Load(object sender, System.EventArgs e)
{
    if (!IsPostBack)
    {
        FillGrid();
    }
}
 
public void FillGrid()
{
    RadGridItemRateSimple.DataSource = new ItemRateDTOService().GetItemsBySearchCriterion(new ItemSearchCriterion());
}
 
protected void RadGridItemRate_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    FillGrid();
}
 
protected void RadGridItemRate_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
    {
        ItemRateDTO itemRateDTO = (ItemRateDTO)e.Item.DataItem;
        RadRating radRating = (RadRating)e.Item.FindControl("RadRatingItem");
        if (radRating != null)
        {
            radRating.DbValue = CommonFunctions.SetDecimal(itemRateDTO.GetAvgRating());
        }
    }
}
 
protected void RadRatingItem_Rate(object sender, EventArgs e)
{
    RadRating radRating = (RadRating)sender;
    GridDataItem dataItem = (GridDataItem)radRating.Parent.Parent;
 
    long itemID = CommonFunctions.SetLong(RadGridItemRateSimple.MasterTableView.DataKeyValues[dataItem.ItemIndex]["Item.ID"]);
    Rating rating = new RatingService().GetSpecificRatingForUser(itemID, ActiveUserID);
 
    if (rating == null)
        rating = new Rating();
 
    rating.ItemID = itemID;
    rating.Rate = Convert.ToInt32(radRating.Value * 10);
    rating.CreatedBy = ActiveUserID;
 
    new RatingService().Save(rating);
     
    RadGridItemRateSimple.Rebind();
}

and the aspx
<telerik:RadGrid ID="RadGridItemRateSimple" OnItemDataBound="RadGridItemRate_ItemDataBound"  OnNeedDataSource="RadGridItemRate_NeedDataSource"
    runat="server" Width="850px" AllowSorting="True" AllowPaging="true" PagerStyle-Position="TopAndBottom" PageSize="30"
    AutoGenerateColumns="False" BorderWidth="0">
    <MasterTableView DataKeyNames="Item.ID">
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top" HeaderText="" SortExpression="ItemName">
                <ItemTemplate>
                    <telerik:RadRating ID="RadRatingItem" runat="server" ItemCount="10" SelectionMode="Continuous"
                                    Precision="Half" Orientation="Horizontal" AutoPostBack="true" OnRate="RadRatingItem_Rate" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Thanks!
Tsvetie
Telerik team
 answered on 13 Jan 2011
3 answers
100 views
Hi,

I set the skin ptoperty to Vista, or other skins exists in telerik package but it does not apply the skina at all.  what am I missed here?

Reards
Mazdak
Yana
Telerik team
 answered on 13 Jan 2011
7 answers
147 views
Hi,
    I am working on Scheduler/Resource Availability having problem with groupby property of Scheduler it's not working .

I am using following code on server side :
Code Snippet :

protected void Page_Load(object sender, EventArgs e)
{
DataTable tblTest = new DataTable();
tblTest.Columns.Add("ID");
tblTest.Columns.Add("RoomID");
tblTest.Columns.Add("startdate");
tblTest.Columns.Add("enddate");
tblTest.Columns.Add("Subject");
tblTest.Columns.Add("RoomName");
DataRow drTest;
drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 10:00:00.000";
drTest["enddate"] = "2011-01-11 12:00:00.000";
drTest["Subject"] = "Scheduled Lesson1";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 14:00:00.000";
drTest["enddate"] = "2011-01-11 16:00:00.000";
drTest["Subject"] = "Scheduled Lesson2";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 3;
drTest["RoomID"] = 3;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson3";
drTest["RoomName"] = "Room2";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 4;
drTest["RoomID"] = 4;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson4";
drTest["RoomName"] = "Room3";
tblTest.Rows.Add(drTest);

RadScheduler2.ResourceTypes[0].DataSource = tblTest;
RadScheduler2.DataSource = tblTest;
RadScheduler2.DataBind();

}

and following is design part(.aspx)

<telerik:RadScheduler ID="RadScheduler2" Skin="Vista" runat="server" DataKeyField="ID"
        DataSubjectField="Subject" GroupBy="Room" GroupingDirection="Horizontal" DataStartField="startdate"     DataEndField="enddate"  Height="552px">
        <AdvancedForm Modal="true" />
        <TimelineView UserSelectable="false" />
        <WeekView UserSelectable="false" />
        <MonthView UserSelectable="false" />
        <DayView UserSelectable="false" />
        <ResourceTypes>
            <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID" />
        </ResourceTypes>
        <AppointmentTemplate>
            <div class="rsAptSubject">
                <%# Eval("Subject") %>
            </div>
            <%# Eval("Description")%>
        </AppointmentTemplate>
        <TimeSlotContextMenuSettings EnableDefault="true" />
        <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

You can check its output in attachment.

Is anything wrong with the code?
Can you help?


Thanks & Regards,
Ruchir

Ruchir
Top achievements
Rank 1
 answered on 13 Jan 2011
2 answers
139 views

Hi

I am trying to hide the GridEditCommandColumn of a GridTableView when the user clicks on the “add new record” commandItem of the GridTableView.

GridEditCommandColumn editColumnMaster = (GridEditCommandColumn)radGridProjects.MasterTableView.GetColumn("masterEditColum");

editColumnMaster.Visible = false;

 

The above code in the item command event of the grid works perfectly to hide the editcolumn of the mastertableview but not the detail table. It seems to me the GridTableView’s editcolumn only hides after the user clicks on save or cancel. The hierarchy load mode of the grid is set to ServerBind and I am using form templates.

 

Thank you

Fred

Fred Mare
Top achievements
Rank 1
 answered on 13 Jan 2011
3 answers
64 views
Hi!

I've been looking at the telerik editor specifications and I have a question. Does it have support to edit existing .doc files?
Example, I have a .doc file and on the page load of the webform where i have the editor i want to load the .doc file to the edit it.
Is this possible?

Thanks in advance,
Rumen
Telerik team
 answered on 13 Jan 2011
2 answers
199 views
I am using radgrid in my project, i have a strange issue about confirmation dialog,
below is a sample code from one of my aspx page...

<telerik:GridButtonColumn CommandName="Delete" HeaderStyle-Width="30px" Text="Delete" UniqueName="columnButtonDelete"   ConfirmDialogType="RadWindow" ConfirmText="Are you sure to delete the record?" ConfirmTitle="Confirm Delete">
</telerik:GridButtonColumn>

the confirmation dialog window opens and works as expected, no problem...

However, some records should be disabled for deleting, when I disable those records from code-behind (inside ItemDataBound event of the gridview) like:

CType(DataItem("columnButtonDelete").Controls(0), LinkButton).Enabled = False

The button is disabled, no problem... But a user still can click on that button and the confirmation dialog pop-ups!?
If the user clicks on 'Yes' to try deleting the record, the confirmation window closes, but the record is not being deleted...

Is it a bug? How can i prevent a disabled button to be clicked?
Mehmet Emrah
Top achievements
Rank 1
 answered on 13 Jan 2011
1 answer
882 views
Hi,
I want to apply Filter in GridTemplateColumn, Please help....
I have paste the code below.


<telerik:RadGrid ID="RadGridCategory" runat="server" GridLines="None" AllowPaging="True"
                                                PageSize="5" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true"
                                                HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="RadGridCategory_NeedDataSource"
                                                OnItemCommand="RadGridCategory_ItemCommand" Width="100%" OnUpdateCommand="RadGridCategory_UpdateCommand"
                                                AllowMultiRowSelection="False">
                                                <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                                <GroupingSettings CaseSensitive="false" />
                                                <MasterTableView CommandItemDisplay="Bottom" DataKeyNames="CategoryID" EditMode="InPlace">
                                                    <CommandItemSettings ShowAddNewRecordButton="false" />
                                                    <Columns>
                                                        <telerik:GridBoundColumn UniqueName="CategoryID" HeaderText="CategoryID" DataField="CategoryID"
                                                            Visible="false">
                                                        </telerik:GridBoundColumn>                                                      
                                                        <telerik:GridTemplateColumn UniqueName="EditColumn" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left"
                                                            HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Left" HeaderText="Category Name">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblName" runat="server" Text="<%# Bind('CategoryName') %>"></asp:Label>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="txtName" runat="server" Text="<%# Bind('CategoryName') %>"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rqfName" runat="server" ControlToValidate="txtName"
                                                                    ErrorMessage="Category Name is Required."></asp:RequiredFieldValidator>
                                                            </EditItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn UniqueName="DisplayText" HeaderText="Display Text" DataField="DisplayText"
                                                            HeaderStyle-Font-Bold="true">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridEditCommandColumn EditText="">
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn CommandName="EditIt" Text="Edit">
                                                        </telerik:GridButtonColumn>
                                                        <telerik:GridTemplateColumn UniqueName="DeleteColumn" ItemStyle-VerticalAlign="Middle"
                                                            ItemStyle-HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <asp:LinkButton runat="server" CausesValidation="false" OnClientClick="if (confirm('Are You Sure You Wish To Delete This record?'))return true; else return false;"
                                                                    CommandName="Delete" Text="Delete" ID="btnDelete"></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                </MasterTableView>
                                                <ClientSettings>
                                                    <ClientEvents OnRowDblClick="RowDblClick" />
                                                </ClientSettings>
                                            </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 13 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?