Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
471 views
I have a radgrid with advanced databinding. it has a template column with combobox on edit mode as follows.

 <telerik:GridTemplateColumn HeaderText="MemberType" EditFormColumnIndex="0" UniqueName="MemberType" SortExpression="MemberType">
                <ItemTemplate>                
                    <asp:Label ID="lblMemberType" runat="server" Text='<%# Eval("MemberType") %>'></asp:Label>                    
                </ItemTemplate>
                <EditItemTemplate>
                <telerik:RadComboBox runat="server" ID="cmbMemberTypes" DataTextField="Description" DataValueField="MemberTypeId" 
                    AppendDataBoundItems="true" MarkFirstMatch="true" OnSelectedIndexChanged="cmbMemberTypes_SelectedIndexChanged" >
                    <Items>
                        <telerik:RadComboBoxItem Text="" Value="" />
                    </Items>
                </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>

 
Now, depending on the item selected in the Member Type combobox, i want to change the text of the column 'MemberIdentifier' on Edit mode. I dont need to change Header Text. I just need to change the auto-generated label of this column in edit mode based on Member Type Selected Item.

        <telerik:GridBoundColumn DataField="MemberIdentifier" HeaderText="MemberIdentifier" UniqueName="MemberIdentifier"
                SortExpression="MemberIdentifier" FilterControlAltText="Filter Member Identifier Column" EditFormColumnIndex="1"/>

Thanks for the help in advance!!
Sri
Attila Antal
Telerik team
 answered on 04 Nov 2019
1 answer
203 views

hi,

 

could you please help how i can insert radgrid data to the database such as attached image ?

 

Thanks

Eyup
Telerik team
 answered on 04 Nov 2019
5 answers
662 views
any example with xaxis also dymanic Like:
Vessy
Telerik team
 answered on 01 Nov 2019
2 answers
388 views

Hello,

 

Im trying to achieve a column chart that shows the sum of activities for 3 types of activities and per date. Checked your examples but this case is not very well explained. I'm sure I'm doing something wrong. Besides getting the same result for each serie they also have the same color.

HTML

<telerik:RadHtmlChart runat="server" ID="ColumnChartActivitiesByDate" Width="100%" Transitions="true" Skin="Bootstrap">
    <Pan Enabled="true" />
    <Legend>
        <Appearance Position="Bottom"></Appearance>
    </Legend>
    <PlotArea>
        <YAxis MaxValue="200" MinValue="0">
            <TitleAppearance Text="Atividades"></TitleAppearance>
        </YAxis>
        <XAxis DataLabelsField="Date"></XAxis>
        <Series>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

 

C# - Getdata method

protected DataTable GetData()
{
    DataTable dt = new DataTable();
 
    dt.Columns.Add("ID", typeof(int));
    dt.Columns.Add("CategoryName", typeof(string));
    dt.Columns.Add("TotalActivities", typeof(int));
    dt.Columns.Add("CategoryColor", typeof(string));
    dt.Columns.Add("Date", typeof(DateTime));
 
    dt.Rows.Add(1, "Run", 0,"#ff0000", new DateTime(2019, 09, 1));
    dt.Rows.Add(2, "Walk", 18, "#00ff00", new DateTime(2019, 09, 1));
    dt.Rows.Add(3, "Swim", 0, "#0000ff", new DateTime(2019, 09, 1));
 
    dt.Rows.Add(4, "Run", 1, "#ff0000", new DateTime(2019, 10, 1));
    dt.Rows.Add(5, "Walk", 29, "#00ff00", new DateTime(2019, 10, 1));
    dt.Rows.Add(6, "Swim", 0, "#0000ff", new DateTime(2019, 10, 1));
 
    dt.Rows.Add(7, "Run", 0, "#ff0000", new DateTime(2019, 11, 1));
    dt.Rows.Add(8, "Walk", 9, "#00ff00", new DateTime(2019, 11, 1));
    dt.Rows.Add(9, "Swim", 0, "#0000ff", new DateTime(2019, 11, 1));
 
    dt.Rows.Add(10, "Run", 0, "#ff0000", new DateTime(2019, 12, 1));
    dt.Rows.Add(11, "Walk", 5, "#00ff00", new DateTime(2019, 12, 1));
    dt.Rows.Add(12, "Swim", 0, "#0000ff", new DateTime(2019, 12, 1));
 
    dt.Rows.Add(13, "Run", 0, "#ff0000", new DateTime(2020, 01, 1));
    dt.Rows.Add(14, "Walk", 7, "#00ff00", new DateTime(2020, 01, 1));
    dt.Rows.Add(15, "Swim", 1, "#0000ff", new DateTime(2020, 01, 1));
 
    dt.Rows.Add(16, "Run", 0, "#ff0000", new DateTime(2020, 02, 1));
    dt.Rows.Add(17, "Walk", 11, "#00ff00", new DateTime(2020, 02, 1));
    dt.Rows.Add(18, "Swim", 3, "#0000ff", new DateTime(2020, 02, 1));
 
    return dt;
}

 

c# - Chart config

ColumnSeries RunColumnSeries = new ColumnSeries();
RunColumnSeries.Name = "Run";
RunColumnSeries.DataFieldY = "TotalActivities";
RunColumnSeries.ColorField = "CategoryColor";
ColumnChartActivitiesByDate.PlotArea.Series.Add(RunColumnSeries);
 
ColumnSeries WalkColumnSeries = new ColumnSeries();
WalkColumnSeries.Name = "Walk";
WalkColumnSeries.DataFieldY = "TotalActivities";
WalkColumnSeries.ColorField = "CategoryColor";
ColumnChartActivitiesByDate.PlotArea.Series.Add(WalkColumnSeries);
 
ColumnSeries SwimColumnSeries = new ColumnSeries();
SwimColumnSeries.Name = "Swim";
SwimColumnSeries.DataFieldY = "TotalActivities";
SwimColumnSeries.ColorField = "CategoryColor";
ColumnChartActivitiesByDate.PlotArea.Series.Add(SwimColumnSeries);
 
ColumnChartActivitiesByDate.DataSource = GetData();
ColumnChartActivitiesByDate.DataBind();

 

Hope I can get some light on this. 

Thank you!

 

 

Vessy
Telerik team
 answered on 01 Nov 2019
2 answers
127 views
I would like to send the text of the combos input into the querystring (?text=abc) when server-side filtering. How can I accomplish this with the wrapper? Alternatively, is there code provided for parsing default query string information?
Peter Milchev
Telerik team
 answered on 01 Nov 2019
3 answers
150 views
Hello,

it seems that there is a client side memory leak in the asp.net telerik controls. We tested this with 2019.3.1023 (the current release).
You can reproduce the leak also with the telerik demo:
https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx

It seems to depend on the excel like filtering, so you have to use this demo. The memory leak doesn't exist in basic filtering.

Each time you make a postback, e.g. use the pager, the browser holds a reference of the "old" grid in memory. Because of this the browser seems to hold the old html elements (orphaned nodes).

Can you confirm the problem and is there a fix available?


Regards
Eyup
Telerik team
 answered on 31 Oct 2019
2 answers
212 views

I am experimenting with dynamically creating chart series using the RadHtmlChart and as long as I I just make a normal column series everything works just fine creating the series dynamically. However once I change the code to try to make the series stack on each other by setting series.stacked = true in the code dynamically creating the series the chart data really messes up. The last series created takes up the entire chart height and if the value was say 70, the y-axis value now says 700000 but the column tooltip still says the data is 70 for the series. The two series created before the last series do not display at all. 

 

Attached are example pictures of my issue and the code I am using to dynamically create the series

Timothy
Top achievements
Rank 1
 answered on 30 Oct 2019
3 answers
148 views

I have RichTextEditor and process paste function witch in Internet Explorer 11 not working correct, copied text get triplicated. Event that handles pasting is fired three times in IE 11. In Chrome everything is working fine.

 

  /**
    * Set the pasted data back into the RadEditor
    */
    ns.RichText.RichTextEditor.prototype.processPaste = function () {
        this.editor.get_document().body.innerHTML = Telerik.Web.UI.Editor.Utils.convertWordLists(this.editor.get_html());
        this.editor.fire("FormatStripper", { value: "WORD" });

        // Set the original content back and insert the newly pasted content at the caret position
        var pastedHTML = this.editor.get_html(true);

        // Reposition the cursor where it was before pasting and then paste the formated html there
        if (this.editorContent === "") {
            this.editorContent = "<br>";
        }
        this.editor.get_document().body.innerHTML = this.editorContent;
        this.restoreSelection();

        var range = this.editor.getSelection().getRange();
       
        range.deleteContents();
        var frag = range.createContextualFragment(pastedHTML);
        range.insertNode(frag);
        
        this.pasting = false;
    };

 

 

I think this line of code are problem

      range.deleteContents();
        var frag = range.createContextualFragment(pastedHTML);
        range.insertNode(frag);

they cause event on pasting to fire three times.

Is there any way to handle inserting pasted text different in IE in code?

Rumen
Telerik team
 answered on 30 Oct 2019
3 answers
604 views
I need to change the ConfirmText Radbutton property when another control is changed using javascript, client-side. There are some method to get, set or remove this property from a Radbutton using javascript?
Vessy
Telerik team
 answered on 30 Oct 2019
5 answers
166 views

For my company, the rad editor is currently used and the users are required to enter all the data in one session. Now the users would like to be able to save their changes in several sessions and not generate the document until all the data has been entered.

I see that the rad editor has 'track changes'. However I am not certain this is exactly what they want to see.

Is there a way for a user to 'save' changes and another way for the user to actually submit their changes so that a document can be generated when needed using the radeditor and/or some other Telerik tool? If so, would you tell me what you recommend and how would I accomplish that goal?

If not, would the 'track changes' or some other feature accomplish my goal?

Thanks for letting me know what you recommend?

 

Rumen
Telerik team
 answered on 30 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?