Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
205 views

Hi I have a RadComboBox in my app where i intend to use OnClientIndexChanging event to cancel the changing of the values based on some specific conditions, however the event is not getting fired in client side JS code ​​

 

<telerik:RadComboBox ID="cbStyleSize" style="width:100%" EmptyMessage="--Select Style Size--" runat="server" RenderMode="Native" DataTextField="Name" DataValueField="ID" OnClientSelectedIndexChanging="OnChanging_Style" OnClientSelectedIndexChanged="OnChanged_Style">
</telerik:RadComboBox>

As you can see i have both OnClientSelectedIndexChanged and OnClientSelectedIndexChanging events , however only OnClientSelectedIndexChanged event is getting fired in JS but not the Changing event.

01.function OnChanged_Style(sender, eventArgs) {
02.    var item = eventArgs.get_item();
03.    var item_text = item.get_text();
04.    var itemValue = item.get_value();
05.     
06.    var ret = ExtractComboValues(itemValue);
07.     
08.    if (ret) {
09.        setData({
10.            sID: ret.sID,   
11.            Name: item_text,
12.            fPrice: ret.price
13.        });
14.         
16.    }
17.}
18. 
19.function OnChanging_Style(sender, eventArgs) {
20.    var item = eventArgs.get_item();
21.    var item_text = item.get_text();
22.    var itemValue = item.get_value();
23.     
24.    var ret = ExtractComboValues(itemValue);
25.    var targetID = ret.sID;
26.         
27.    var errFunc  = function(e)  { e.set_cancel(true); }
28.    var succFunc = function(e)  { e.set_cancel(false);}
29.     
30.    if (ret) {
31.        VerifySelection(targetID, succFunc, eventArgs, errFunc, eventArgs); 
32.    }
33.}

 

Just on a side note , the OnChanging_Style JS function , makes an AJAX call through VerifySelection function and based on the result of that function set_cancel(true) is being called. .Do you think its legal that an AJAX function whenever returns can revert back the ComboBox fired event ?

 

Nencho
Telerik team
 answered on 22 Apr 2015
1 answer
147 views

Dear Telerik,

For the company I am working for I am looking for a simple and good performing solution for a problem.

We want to display a grid with filtering next to a chart which displays one or more series based on the data in the grid.

When the filter is altered the data in the grid, but also the data in the chart should be updated.

Is it possible to simply connect your RadGrid to RadHTMLChart to get this behaviour?

And how/can the data be shared between those two components and if so are there limitations?

I did read that your RadGrid support EntityDataSource and your own ClientDataSource, but I did not see anything about this in the RadHTMLChart component documentation.

For example if I want to fill the grid with data about cars with these columns: "Brand", "Year" and "Price".
And next to the grid I wanted to display two charts:
A pie chart with the number of cars per brand
A bar graph with the cumulative prices per year per brand.

Could this be achieved quite easily by setting the data source of the grid to the charts and setting up the series/axis correctly?
Or is it required to create queries specific for the chart?
For example for the pie chart of the example should "Brand" and "Number of cars" be selected?

Hopefully you can answer these questions for me (and have I posted this in the correct forum)

With kind regards,

Sjoerd van Loon
Senior Software Engineer
Infoland BV
The Netherlands

Danail Vasilev
Telerik team
 answered on 22 Apr 2015
3 answers
125 views

Hello,

I have a RadGrid that also has a Detail Table. The RadGrid properly serializes the settings to persist, however, the Detail Table's column settings do not persist.  What are the requirements to allow the GridTableView column settings inside of the Detail Table to persist? 

 Thank you for your help

Kostadin
Telerik team
 answered on 22 Apr 2015
1 answer
94 views

For the last few days, I've tried, with no success to achieve something that should be doable.

Cascading radcomboboxes in a detailtable that is in batch edit.

I have a Radgrid bound to a sqldatasource with a GridTableView in batch edit.

Column 1, is a gridtemplate column with a radcombobox (combo1), bound to a sqldatasource. AllowCustomText="true"

Column 2 is a gridtemplate column with a radcombobox (combo2) that needs the selected item in combo1 and then rebind or rebuild the list of items based upon the selection of combo1. Again, autotext=True

Column3 is a gridtemplate textbox that will be populated based upon a query of combo1 and combo2 selected values (or text - doesn't matter).

I know you can't set autopostback=true because of the batch edit.

I've tried figuring out a client side rebinding of combo2, but no joy.

Can anyone PLEASE provide some example of this?

thanks in advance.

John

 

 

Konstantin Dikov
Telerik team
 answered on 22 Apr 2015
1 answer
339 views
Is there a way to add margins around elements in the built in default edit form (AllowAutomaticUpdates="true")? The items are too close together. Sample attached. Thanks!
Konstantin Dikov
Telerik team
 answered on 22 Apr 2015
4 answers
176 views
Hello,

We have to deal with a large amount of data from an Nhibernate queryOver (about 40.000 to 1.000.000 rows).
We need to show this data as a pivot grid restitution in our web app, and apparently, that kind of component would suits our needs.

As we have a lot of data : 
- Would it be better to use Server-side pivot grid instead of KendoUI component ?
- Is it possible to do a dynamic skip/take with an Nhibernate query to avoid all data in memory by getting grid current settings like filter, order, paging ?
- If this is not possible with Nhibernate, would it be with a simple SQL query ?

Regards,
Maxime LEMARE.

Au
Top achievements
Rank 1
 answered on 22 Apr 2015
1 answer
231 views

Hi

 This is My code . Here when i enter the Total textbox i need show the footer template for running Total how will do this client side this any one guide me.

 <telerik:RadGrid ID="Grd1" runat="server" AutoGenerateColumns="false" ShowFooter="true">
            <MasterTableView DataKeyNames="EmpId">
                <Columns>
                    <telerik:GridBoundColumn DataField="EmpName" HeaderText="EmpName" UniqueName="EmpName"></telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Amount" UniqueName="Amount">
                        <ItemTemplate>
                            <asp:TextBox ID="TXTTOTAL" runat="server" Text='<%# Eval("Empamt") %>'></asp:TextBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

Eyup
Telerik team
 answered on 22 Apr 2015
4 answers
292 views

I have a regular radGrid where I do some data formatting for localization.

 I want to get at the GridDataItem like so:

protected void OnItemDataBound(object sender, GridItemEventArgs e)
       {
           // We need to make sure empty entries are intialized to 0.00 and are set to the correct currency symbol
           if (e.Item is GridDataItem)
           {
               GridDataItem item = (GridDataItem)e.Item;
               FormatItem(item);

I know that a radPivotGrid does not have an OnItemDataBound event. I'm also not certain there is an event that receives the GridItemEventArgs?

It seems like the path I may want to take is to get at the individual cells within the pivot grid. Perhaps through the radPivotGrid1_OnCellDataBound event.

This event receives -> PivotGridCellDataBoundEventArgs

So my question is this. Am I on the right path? If I want to iterate the grid and format the numerical data how would I go about getting at the actual cell?

 Thanks,

julian

Maria Ilieva
Telerik team
 answered on 22 Apr 2015
4 answers
223 views

I was having trouble with the Insert Symbol tool - it would insert (for example) Ω which looks nice. But, after saving a re-opening the editor, the Ω was gone, replaced by an unknown character glyph. I enabled the ConvertCharactersToEntities filter so that the Insert Symbol tool would insert the entity code for the chosen symbol - in this example, &Omega;

This worked great until I tried to insert some javascript. My script included something like this:

    if (x > 5)

This got converted to:

    if (x &gt; 5)

which doesn't work very well.

How can I keep my entities and still allow javascript?

Ianko
Telerik team
 answered on 22 Apr 2015
3 answers
60 views

using a RadTreeList I wonder how to hide the expand / collaps Icon when there are no records under parent item

What I found within this platform is

http://www.telerik.com/help/aspnet-ajax/grid-hide-expand-collapse-images-when-no-records.html

but as far as I can see this does not work for RadTreeList, doesn't it?

Santi
Top achievements
Rank 1
 answered on 22 Apr 2015
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?