Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
252 views

In the RadEditor we have the NewLineMode set to Div...

Me.NewLineMode = EditorNewLineModes.Div

We are also using a ToolsFile xml document to control the tools available in RadEditor.

The problem is the InsertParagraph tool now inserts <div> tags instead of <p> tags.

We want to keep the NewLineMode behavior as DIV while still having a tool that can insert a paragraph (i.e. a <p> tag).

How can we do this?

 

Rumen
Telerik team
 answered on 10 Oct 2016
8 answers
232 views
Hi,

I have a dropdown list set up as such:

<

 

 

telerik:GridDropDownColumn DataField="GroundGear" DataSourceID="getGroundGears" HeaderText="Ground Gear" ListTextField="GroundGearName" ListValueField="GroundGearCode" UniqueName="GroundGear" ColumnEditorID="GroundGear" Reorderable="False" Resizable="False" Visible="false">

 



With the datasource embedded in the the .aspx page as such:

<

 

 

asp:SqlDataSource ID="getGroundGears" runat="server" ConnectionString="<%$ ConnectionStrings:FisheriesConnectionString %>"

 

 

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT code as [GroundGearCode], name as [GroundGearName] FROM DisGroundGear">

 

 

 

</asp:SqlDataSource>

 



Though I was wondering how I can change the datasource to point to a tableadapter/dataset, rather than having the SQL code in the same page as the grid?

Thanks, Ida
Konstantin Dikov
Telerik team
 answered on 10 Oct 2016
9 answers
343 views
In my opinion, there is a bug in alignment of the GridNumericColumn and possibly other columns as well.
Numeric column default justification formating should be RIGHT.  Moreover, if the (ItemStyle-HorizontalAlign="Right") is set, there should not be any questions how the content is supposed to be aligned.  However, when going to EDIT MODE (InPlace), the edit box show the content on the LEFT.  Even, if I asign the style for the edit box in the ItemDataBound() as follows:

textbox = (

RadNumericTextBox)editItem["AmountPayorFC"].Controls[0];

 

textbox.NumberFormat.AllowRounding =

true;

 

textbox.NumberFormat.DecimalDigits = 0;

textbox.Style.Add(

"text-align", "right");

 


the edit box shows the content on the LEFT.  When I click inside the box, then the content switches to the RIGHT.
I am using IE8.   This is very anoying and incorrect.


Chris
yuvaraj
Top achievements
Rank 1
 answered on 10 Oct 2016
1 answer
228 views

Hello there ..

 

I have been used a GridClientSelectColumn within a radgrid in order to take user selection

but my radgrid has multiple pages

when I chose items from first page and go to the second page I lose my items in my first page

 

how can I solve that . . . .

Viktor Tachev
Telerik team
 answered on 07 Oct 2016
1 answer
223 views

Hello, i am trying to perform drag and drop from tree view into a textbox control.  However, i m having some issues.  My treeview is databound to a sqldatasource if that makes a difference.  can someone please take a look at my code...thanks

protected void RadTreeView1_NodeDrop(object sender, Telerik.Web.UI.RadTreeNodeDragDropEventArgs e)
        {
            if (TextBox1.ClientID == e.HtmlElementID)
            {
                TextBox1.Text = String.Empty;

                foreach (RadTreeNode node in e.DraggedNodes)
                {
                    {
                        //problem area!
                        TextBox1.Text = sender.ToString();
                            

                    }

                    if (TextBox1.Text.Length > 0)
                        TextBox1.Text = TextBox1.Text.TrimEnd(new char[] { ',', ' ', '\n' });

                }
            }

Ivan Danchev
Telerik team
 answered on 07 Oct 2016
3 answers
313 views

Hi,

I am trying to have a grid where the detail item template is clickable/selectable as one with the columns relating to it.

If you take the demo http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/rows/detailitemtemplate/defaultcs.aspx as an example, then I would like to click the row with the pictures and have the main row selected along with the detail item row. Effectively the row and detail item row should behave as one.

Can anyone please help?

Gary

Viktor Tachev
Telerik team
 answered on 07 Oct 2016
1 answer
136 views

I have a RadGrid in an update panel.  I also have a RadWindowManager with several windows.

I have a column in the RadGrid that, when clicked, fires the ItemCommand event of the grid.  In this event I generate a file from data in our database and send it to the browser:

        byte[] s = System.Text.Encoding.ASCII.GetBytes(FileXML);
        this.Response.ClearHeaders();
        this.Response.Buffer = true;
        this.Response.ContentType = "application/octet-stream";
        this.Response.AddHeader("Content-Length", s.Length.ToString());
        this.Response.AddHeader("Content-Disposition", "attachment; filename=\"" + FileName + ".vlt\"");
        this.Response.BinaryWrite(s);
        Response.Flush();
        Response.End();

 

This of course causes an error unless I register the RadGrid as a postback control in Page_Load:

        ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
        scriptManager.RegisterPostBackControl(rgTemplates);

 

However, I have another column in this same grid that, when clicked, displays a RadWindow.  The code-behind in the ItemCommand event is:

        if (e.CommandName == "Upload")
        {
            HiddenField hdnTemplateUploadID = (HiddenField)e.Item.FindControl("hdnTemplateUploadID");
            string UploadID = hdnTemplateUploadID.Value;

            string script = "OpenTemplateReplace('" + UploadID + "');";
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ShowUploadWin", script, true);
        }

which calls the javascript function:

    function OpenTemplateReplace(UploadID) {
        var oManager = GetRadWindowManager();
        $('[id*="hdnReplaceTemplateUploadID"]').val(UploadID);
        radWin = oManager.GetWindowByName("rwReplaceTemplate");
        radWin.setSize(500, 175);
        radWin.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
        radWin.show();
        radWin.center();
        return false;
    }

When the RadGrid is registered as a postback control, this fails because the oManager ends up being undefined.  

I also have a RadAsyncUpload control (in the same UpdatePanel as the RadGrid) and after I click the column and get the javascript error described above, the RadAsyncUpload control is no longer shown.

Is there some workaround or something to avoid having to register the RadGrid as a postback control and still be able to send a file via the Response?  I'm trying to avoid actually creating the files and just having the column be a link to the file.

Konstantin Dikov
Telerik team
 answered on 07 Oct 2016
1 answer
80 views

I have a grid which displays a field called "Import Type". There are various options under the Import Type based on a pre-defined enum model. One of the ImportType options is "Custom". If the user selects a Custom option, then another column next to it, "Mapping" needs to be enabled and mandatory. If the user selects any other ImportType, then "Mapping" needs to be blank and disabled. That is, if ImportType = "Custom" then Mapping is a mandatory cell for that particular row. If ImportType != "Custom" then Mapping should be disabled and blank. This ideally needs to be realtime during edit mode. So if the user clicks Edit and makes changes, this needs to be reflected instantly.

 

I'm struggling to get this working at all, mainly as I'm not sure what I'm doing it. Here is my code for the column so far.

columns.Bound(c => c.ImportType).Title("Import Type");
    columns.Bound(c => c.Mapping).Title("Mapping")     
    .ClientTemplate(
             "# if(ImportType== Models.CommonEnums.ImportType.Custom) #" +
             "# { return MappingId.HasValue === true} #" +
             "# else {MappingId = ''} #"
             );

Should I be using a Client Template? I have tried a few other things, using just .Template, however this didn't do much for me either.

 

Could you point me in the right direction?

 

 

Viktor Tachev
Telerik team
 answered on 07 Oct 2016
2 answers
53 views
I have a problem with FindAndReplace functionality. Our logic prevents modifying some text parts in RadEditor. With Replace I can modify these text parts. To return them to original state I want to have notification event informing about Replace is done.

Is there such event (which is called after replace is done)?
Or what can I do in my situation?
raghuram
Top achievements
Rank 1
 answered on 07 Oct 2016
1 answer
891 views

Hi,

Is it possible to show only the Month & Year popup and hide the days popup?

 

Thank you

Rumen
Telerik team
 answered on 07 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
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
Bronze
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?