Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views
Hello,

I have both RadEditor features enable on a site. I confirmed that this work for the OTB editform.aspx and newform.aspx pages.

I have a custom web control developed in C# using visual studio. There is a .CS file (compiled DLL is installed in the GAC), .ASCX web control file in the CONTROLTEMPLATE folder, and then the .ASPX page in a regular folder under the root.

The web control (.ASCX) file has the following code for a description field:

 

<tr>
        <td style="width:44%" class="ms-formlabel" valign="top">
            Description
        </td>
        <td style="width:53%" class="ms-formbody">
            <asp:HiddenField ID="hdnDescription" runat="server" />
            <span>
                <span dir="ltr">
                    <textarea name="txtDescription" rows="6" cols="20" id="idDescription" title="Description" class="ms-long">
                      <%= Server.HtmlEncode(hdnDescription.Value)%>  
                    </textarea>
                    <script>if (browseris.ie5up && browseris.win32 && !IsAccessibilityFeatureEnabled()){RTE_ConvertTextAreaToRichEdit("idDescription", true, true, "", "1033", null, null, null, null, null,"FullHtml", "\u002f",null,null,null,null);}else{document.write(" <br><SPAN class=ms-formdescription><a href='javascript:HelpWindowKey(\"nsfullrichtext\")'>Click for help about adding HTML formatting.</a></SPAN> <br>");};</script>                    
                </span>                                         
  
            </span>    
        </td>
        <td style="width:20%"> </td>
    </tr>

The RadEditor will not load up. The page is displayed using the OTB HTML editor. Is there anyway to fix this issue?
Stanimir
Telerik team
 answered on 11 Apr 2011
1 answer
169 views
Hi,

I am using the RadGrid control with EditMode="InPlace". I have a dropdown and following the example as below:

http://www.telerik.com/help/aspnet/grid/grdoperationswithdropdownlistinedititemtemplate.html

Using the GridDropDownColumn did not work well with my custom datasource. Thats why I am using the above link as a sample

<

 

Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-CssClass="edit" ItemStyle-CssClass="edit" />

 

 

<telerik:GridBoundColumn DataField="Name"  ReadOnly="True"

 

 

 

HeaderText="Header1" />

 

 

 

 

 

<telerik:GridTemplateColumn DataField="Description" HeaderText="Header2" >

 

 

 

<ItemTemplate>

 

 

<asp:Label id="Label1" runat="server">

 

<%

# DataBinder.Eval(Container.DataItem, "Description")%>

 

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

<asp:DropDownList id="drpDown" runat="server" />

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 


I am populating the dropdowon on edit mode as below:

 

if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

 

{

 

 

GridEditableItem item = e.Item as GridEditableItem;

 

 

 

// access/modify the edit item template settings here

 

 

DropDownList dropDownList = item.FindControl("drpDown") as DropDownList;

 

 

dropDownList.DataSource = reactions;

 

dropDownList.DataTextField =

"description";

 

 

dropDownList.DataValueField =

"id";

 

 

 

PatientAllergy paRowData = (e.Item.DataItem as PatientAllergy);

 

 

 

if (paRowData != null)

 

 

{

 

 

if ((paRowData.Description!= null))

 

 

dropDownList.SelectedValue = paRowData.Id;

 

}

 

dropDownList.DataBind();

 

 

}


fine. I have two outstanding questions:
I want to achive the the batch update with inline editing
1.  How do I collapse the editable row when I click outside of the row.
2. How do I keep track of edited rows. Does Telerik has a implematioan for this. the below example does it only with client side and ondoubleclick editing. But I want to achieve with EditMode="InPlace". I want to do inline editing when the Edit button is clicked for the particular row. Please point me the direction.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

.

Daniel
Telerik team
 answered on 11 Apr 2011
5 answers
99 views
I can't get the "OK" button on the rad alert hover to change.  I checked the CSS and skins with no luck.
Marin Bratanov
Telerik team
 answered on 11 Apr 2011
3 answers
150 views
Hi everyone,

I'm now to ASP.net and programming work i use the RADGridView in my website.
the question is how I can change the color of the cell based on a specific conditions that my column is a datetime. I want if the due date is pass the color should be RED.


Thanks for your help in advance
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
96 views
I am creating a tabstrip with a pageview that has a radgrid in it.  Based on data that comes from an sql database there may be several tabs that are created dynamically.  I would like to have the tabs strip setup as a vertical left tabstrip.  The tabstrip always display on the top of the pageview.  Here is the creation code:

            RadTabStrip rts = new RadTabStrip();
            rts.ID = "RadTabStrip1";
            rts.MultiPageID = "yearsPages";
            rts.Orientation = TabStripOrientation.VerticalLeft;


            RadMultiPage rmp = new RadMultiPage();
            rmp.ID = "yearsPages";


            this.PlaceHolder1.Controls.Add(rts);
            this.PlaceHolder1.Controls.Add(rmp);


            DataTable dt = DAL.Routines.getDataTableFromSQL("SELECT Distinct Year FROM Scores ORDER BY Year");
            foreach (DataRow dr in dt.Rows)
            {
                RadTab rootTab = new RadTab();
                rts.Tabs.Add(rootTab);
                rootTab.Text = "Year: " + dr["Year"].ToString();
                RadGrid grd;
                RadPageView pv = new RadPageView();
                grd = buildGrid(Convert.ToInt32(dr["Year"]));
                pv.Controls.Add(grd);
                rmp.PageViews.Add(pv);
            }
            rts.SelectedIndex = 0;
            rmp.SelectedIndex = 0;

Kate
Telerik team
 answered on 11 Apr 2011
3 answers
139 views
Hello,

I'd like to see if it's possible to use a dynamically generated RadEditor to return a plain text string all from the server side.

Dim myHTML as String = "Some text <strong>with formatting.</strong>"
  
Dim myEditor as New RadEditor
myEditor.Content = myHTML
myEditor.DataBind()
myEditor.StripFormattingOptions = EditorStripFormattingOptions.All
  
myHTML = myEditor.Content

Now I realize that the StripFormattingOptions is only going to work on a client side paste event.  So I am wondering if there is a way to either use client side script to get the plain text or some other method that i'm missing.

Hopefully that makes sense! Thanks,
Sean
Rumen
Telerik team
 answered on 11 Apr 2011
3 answers
197 views
I have just migrated over to the new rotator and i'm not overly impressed. In some respects the old version is better. One of the annoying issues I am having has to do with the border around the control. Setting it to "None" does not remove the border nor does setting the border width to 0px. Is there a way for me to get rid of this border?
Steven
Top achievements
Rank 1
 answered on 11 Apr 2011
1 answer
137 views
Hello,

I think I may have found a problem (although it might not be an "exposed" problem) with the RadRotator in the most current release...

I am setting attribute values of the rotator item from the database on ItemDataBound...

then when the item is shown on the client, I update various GUI elements to what they should be based on the attributes.

getting the item attributes of the radrotator was a bit difficult, and someone at telerik helped me by providing me with the GetAttributeValue function (shown in the javascript code below).

Perhaps some of this has changed???

The page was working fine, and then when I updated to the new release it started behaving a bit differently...

if i move onto the nth item from the (n-1)th item, the GUI updates to the correct values for the (n-1)th item...

on the other hand, if i move onto the nth item from the (n+1)th item, the GUI updates to the correct values for the (n+1)th item...

any ideas?

void _rotator_ItemDataBound(object sender, RadRotatorEventArgs e)
{
    DataRowView itemView = e.Item.DataItem as DataRowView;
    if (itemView != null)
    {
        e.Item.Attributes["imageUrl"] = ImagesFolderUrl + itemView.Row["DocumentID"].ToString().PadLeft(8, '0') + "/" + itemView.Row["PageNumber"].ToString().PadLeft(4, '0');
        e.Item.Attributes["Author"] = isnullorempty(itemView.Row["Author"].ToString(), " ");
        e.Item.Attributes["AuthorTitle"] = isnullorempty(itemView.Row["AuthorTitle"].ToString(), " ");
        e.Item.Attributes["CompanyName"] = isnullorempty(itemView.Row["CompanyName"].ToString(), " ");
        e.Item.Attributes["PageNumber"] = itemView.Row["PageNumber"].ToString();
        e.Item.Attributes["TitleDescription"] = isnullorempty(itemView.Row["TitleDescription"].ToString(), " ");
        e.Item.Attributes["ConferenceName"] = isnullorempty(itemView.Row["Conference"].ToString(), " ");
        e.Item.Attributes["PresentationDate"] = ((DateTime)itemView.Row["DateOfPresentation"]).ToString("MMMM dd, yyyy");
        e.Item.Attributes["SlideID"] = itemView.Row["SlideID"].ToString();
        e.Item.Attributes["DocumentID"] = itemView.Row["DocumentID"].ToString();
        e.Item.Attributes["PageLayout"] = itemView.Row["PageLayout"].ToString();
 
        if (itemView.Row.Table.Columns.Contains("resultID"))
            e.Item.Attributes["resultID"] = itemView.Row["resultID"].ToString();
    }
}


function SetRotatorToSlideID(slideID) {
    var items = rotator.get_items();
    for (i in items) {
        if (slideID == GetAttributeValue(items[i], "SlideID")) {
            rotator.set_currentItemIndex(items[i].get_index(), true);
            UpdateGUI(items[i]);
            break;
        }
    }
}
 
function GetAttributeValue(anObject, strProperty) {
    if (anObject) {
        var attributes = $telerik.$('[' + strProperty + ']:first', anObject.get_element()).attr(strProperty);
        if (attributes) {
            return attributes;
        }
    }
}
 
function RotatorClientItemShowing(sender, args) {
    stateHandled = true;
    setLoading(true);
    UpdateGUI(args.get_item());
}
 
function RotatorClientItemShown(sender, args) {
    stateHandled = false;
}
 
function RotatorClientItemClicked(sender, args) {
    sender.set_currentItemIndex(args.get_item().get_index(), true);
}
 
function UpdateGUI(item) {
    var companyName = GetAttributeValue(item, "CompanyName");
    var title = GetAttributeValue(item, "TitleDescription");
    var pageNum = GetAttributeValue(item, "PageNumber");
    var author = GetAttributeValue(item, "Author");
    var authorTitle = GetAttributeValue(item, "AuthorTitle");
    var conference = GetAttributeValue(item, "ConferenceName");
    var presDate = GetAttributeValue(item, "PresentationDate");
    var layout = GetAttributeValue(item, "PageLayout");
 
    document.getElementById("lblSelectedRotatorItem").innerText = companyName + " - " + title + " - " + author + " - Page " + pageNum;
    document.getElementById("LargeImage").src = GetAttributeValue(item, "imageUrl") + ".png";
 
    document.getElementById("LargeImage").width = ImageWidth(layout);
 
    document.getElementById("lblCompanyName").innerText = companyName;
    document.getElementById("lblTitle").innerText = title;
    document.getElementById("lblConferenceName").innerText = conference;
    document.getElementById("lblAuthor").innerText = author;
    document.getElementById("lblAuthorTitle").innerText = authorTitle;
    document.getElementById("lblDate").innerText = presDate;
 
    setHash(GetAttributeValue(item, "DocumentID"), GetAttributeValue(item, "SlideID"));
    setLoading(false);
}


edit:

it seems that the RotatorClientItemClicked event is also a bit faulty...

when clicking an item, the rotator moves to the correct item, however it does NOT do so with animation...

in addition, the GUI does not change at all when this happens...

Niko
Telerik team
 answered on 11 Apr 2011
1 answer
162 views
Hello, I've a RadGrid into ASP:Panel but the RadGrid Rebind don't work correctly!

When close modal (RadWindow) or change the page with RadGrid pagination, the grid collapse and don't rebind the data (with debug, the page except the ItemDataBound on Rebind).

-- RAM -- 

        protected void RAM_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.Rebind();
            }
            else if (e.Argument == "RebindAndNavigate")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.MasterTableView.CurrentPageIndex = RG1.MasterTableView.PageCount - 1;
                RG1.Rebind();
            }
        }

-- RAD MANAGER AND JS --

            function refreshGrid(arg) {


                if (!arg) {
                    $find("<%= RAM.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RAM.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }


       </script>
    </telerik:RadCodeBlock>


    <!-- Rad Ajax Manager -->
    <telerik:RadAjaxManager ID="RAM" runat="server" OnAjaxRequest="RAM_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RAM">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RG1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Why this?
Thanks.
Iana Tsolova
Telerik team
 answered on 11 Apr 2011
1 answer
70 views
hello Telerik,
 i am using RadCalender control. and i want to implement a scenario. in my scenario i have to show some special dates for a month highlighted.
for example i want to highlight all those dates in a perticular month on which meetings are scheduled, or those dates on which holidays 
 are falling.
pls suggest me the way to implement it in silverlight.
Yana
Telerik team
 answered on 11 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?