Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
44 views
When I add an expression, the ExpressionItemCreated gets fired not only for the expression I'm adding, but for all existing expressions as well. Is this normal behavior?
Eyup
Telerik team
 answered on 20 Jun 2016
1 answer
54 views
Hello everyone,

 

I would like to know how it's possible to choose which filters we need. In fact at the beginning, we have NoFilter, Contains, DoesNotContain (too much)... And I would like only Contais and EqualTo. So how it works?

 

Thank you.

Pavlina
Telerik team
 answered on 20 Jun 2016
1 answer
202 views

I am attempting to add the new PRINT BUTTON within the RADGRID.  It shows it I change the radgrid RenderMode to lightweight, however this changes some of my design elements and I must keep the RADGRID rendermode as "Classic" - However this eliminate the new PRINT BUTTON from showing/displaying. 

How can I resolve this?

 

 

Pavlina
Telerik team
 answered on 20 Jun 2016
2 answers
160 views

Hi ,

 

I am new to this radgrid . Need some help from anyone who has faced this issue. In the EditFormSetting in the radgrid i have two raddropdownlist. The functionality that i need is ..on selectionindexchange of the first dropdownlist,the contents of second dropdownlist need to be populated from a datasource. How do i achieve this? The problem i am facing is i am not able to access the dropdownlist control in the selectionchanged event of the first dropdownlist.

 

  <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table style="width: 500px">
                          <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="lblDropdown1:" Visible="true"></asp:Label>
                                </td>
                                <td class="tableCellRight" style="width: 85%">
                                    <asp:DropDownList ID="rd_Dropdown1" runat="server" AppendDataBoundItems="True" AutoPostBack="True"   Visible="true" OnSelectedIndexChanged="rd_Dropdown1_SelectedIndexChanged" DataSourceID="ds_dropdown1" DataTextField="field2" DataValueField="field1">
                                        <Items>
                                            <asp:ListItem runat="server" Text="--Select item--" Value="NA" />
                                             
                                            
                                        </Items>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="lbldropdown2:" Visible="False"></asp:Label>
                                </td>
                                <td class="tableCellRight" style="width: 85%">
                                   <telerik:RadDropDownList ID="rd_dropdown2" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="ds_dropdown2"  DataTextField="field2" DataValueField="field1"  Visible="False">
                                        <Items>
                                            <telerik:DropDownListItem runat="server" Text="--Select names--" Value="N/A" />
                                            
                                        </Items>
                                    </telerik:RadDropDownList> 
                                </td>
                            </tr>
                            
                        </table>
                    </FormTemplate>
                </EditFormSettings>

 <asp:SqlDataSource ID="ds_dropdown1" runat="server" ConnectionString="<%$ ConnectionStrings:xxConnectionString%>" SelectCommand="SELECT field1, field2 FROM [table1] ">
                   </asp:SqlDataSource>

 <asp:SqlDataSource ID="ds_dropdown2" runat="server" ConnectionString="<%$ ConnectionStrings:xxConnectionString %>" SelectCommand="SELECT [field1], [field2] FROM [table1] WHERE (somecondition)">          
        </asp:SqlDataSource>

codebehindfile event code

 protected void rd_Dropdown1_SelectedIndexChanged(object sender,EventArgs e)
    {
       //what code is required here to fetch or access dropdown2 control so that i bind it with suitable sqlcommand?


   
        //RadGrid1.DataBind();
    }

 

 

Kostadin
Telerik team
 answered on 20 Jun 2016
5 answers
249 views
oComboBox.OnClientSelectedIndexChanged = "ShowHideTextbox('" & oComboBox.ClientID & "','" & oTextbox.ClientID & "','" & oLabel.ClientID & "')"

^ doesn't work and I see on API I should just have a function name there such as this?
oComboBox.OnClientSelectedIndexChanged = "ShowHideTextbox"

inside my js function I see I can do this
 var item = eventArgs.get_item();

but how can I assign my 3 values into arguments called into the function?
Ivan Danchev
Telerik team
 answered on 20 Jun 2016
7 answers
335 views
I am trying to use multiple GridViewTable inside NestedViewTemplate with different data sources. It displays only one at a time and ignores other. is there any way to display them both?
Kostadin
Telerik team
 answered on 20 Jun 2016
2 answers
359 views
I want to bind on one array to draw a 2 lines chart like
            decimal[] pumpA_array = { 18.6m, 26.5m, 25.8m, 24.3m, 24.9m, 23.2m, 22.0m, 22.4m, 22.9m, 21.7m, 21.2m, 20.2m };
            decimal[] pumpB_array = { 5m, 10m, 15m, 20m, 25m, 30m, 35m, 30m, 25m, 24m, 22m, 20m };

 

 

How must i bind to my array's to get 2 lines like Attached image file please ?

In the telerik example datasource get only one array OR it is declaratively...

 

THANKS for your help

 

 

Pierre
Top achievements
Rank 1
 answered on 20 Jun 2016
1 answer
601 views

Hi,

The text color of my cells is not updated when I call the Rebind() of my RadGrid.

I've implemented my logic as the following :

- I fill my grid datasource in the NeedDataSource event

- I set the style logic in the ItemDataBound event

Protected Sub RgPermisMontage_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RgPermisMontage.ItemDataBound
        If TypeOf e.Item Is GridHeaderItem Then
            '''
        ElseIf TypeOf e.Item Is GridGroupHeaderItem Then
            '''
        ElseIf TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = e.Item
            If item("ysnDepotPrev").Text Then
                item("dtDepot").ForeColor = Color.FromArgb(218, 95, 37)
                item("dtDepot").Font.Italic = True
            Else
                item("dtDepot").ForeColor = Color.Black
                item("dtDepot").Font.Italic = False
            End If
            '''
        End If
    End Sub

Then I update my grid source so I call the Rebind() to force the RadGrid to raise NeedDataSource event and ItemDataBound.

My cell value is well updated but the cell style not.

 

Do you have any ideas ?

Rémi
Top achievements
Rank 1
 answered on 20 Jun 2016
2 answers
286 views

Hi, I have a problem with my grid. This grid is showed to the user, in a popup, when he click on a link.

 

This is my grid:

<div id="dialog" >
    <telerik:RadGrid ID="RadGrid1" RenderMode="Lightweight"
        ClientDataSourceID="RadClientDataSource1"
        AllowPaging="false" AllowSorting="false" AllowFilteringByColumn="false"
        PageSize="5" runat="server" >
        <MasterTableView DataKeyNames="Name" ClientDataKeyNames="Name" >
            <Columns>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        </ClientSettings>--%>
    </telerik:RadGrid>
</div>

 

and this is my RadClientDataSource:

 

<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" >
    <ClientEvents OnCustomParameter="ParameterMap" OnDataParse="Parse" />
    <DataSource>
        <WebServiceDataSourceSettings BaseUrl="../ReportService.svc/">
            <Select Url="GetFlusso" DataType="JSON" RequestType="Post" ContentType="application/json; charset=utf-8"
                EnableCaching="false" />
        </WebServiceDataSourceSettings>
    </DataSource>
    <Schema ResponseType="JSON" >
        <Model>
            <telerik:ClientDataSourceModelField FieldName="Name" DataType="String" />
        </Model>
    </Schema>
</telerik:RadClientDataSource>

 

This is my link (created with javascript):

"<a href='javascript: openScartiDialog(" + id + ");'><em>CLICK</em></a>"

where id is a parameter for a select method on web service.

 

Now, these are the functions that parse to/from my web service:

function ParameterMap(sender, args) {
    if (args.get_type() == "read" && args.get_data()) {
 
        var dialog = $("#dialog");
        var id = dialog.id;
 
        if (id != undefined) {
            var request = {
                InputContract: {
                    IdFlusso: id
                }
            };
            args.set_parameterFormat(kendo.stringify(request));
        }
    } else {}
}
 
function Parse(sender, args) {
    var response = args.get_response().Output;
    if (response) {
        if (response.length > 0) {
            args.set_parsedData(response);
        } else {
            var model = [];
        }
    }
}

 

All works. My Web Service works (I have tried with other grids).

The problem is: the request on the server (performed by the RadClientDataSource, called by the RadGrid) is made on page load.

I want to avoid this, I just want that the grid is loaded, showed on the link click (indeed, I want to pass the id parameter). But I don't know how.

 

To be more clear, this is the rest of my implementation: the js code for showing/hiding the popup and for set the id.

 

$(function () {
    $("#dialog").dialog({ autoOpen: false, modal: true, show: "blind", hide: "blind", width: "auto",
        buttons: {
            "OK": function () {
                $(this).dialog("close");
            },
            "Annulla": function () {
                $(this).dialog("close");
            }
        }
    });
 
 
});
 
 
function openScartiDialog(id) {
    var div = $("#dialog");
    div.attr('id', id);
    div.dialog("open");
 
    var grid = $telerik.findGrid("RadGrid1");
    var m = grid.get_masterTableView();
     
    m.rebind();
 
    return false;
}

 

 

Viktor Tachev
Telerik team
 answered on 20 Jun 2016
1 answer
82 views

Hello,I want to localization the ok and cancel button of ConfirmDialog in grid,how to do that?

here is the code of aspx:

<telerik:RadGrid RenderMode="Lightweight" runat="server" ID="MainGrid" AutoGenerateColumns="false" AllowPaging="true"
            OnNeedDataSource="MainGrid_NeedDataSource" OnUpdateCommand="MainGrid_UpdateCommand"
            OnItemCreated="MainGrid_ItemCreated" OnDeleteCommand="MainGrid_DeleteCommand"
            OnInsertCommand="MainGrid_InsertCommand" >
            <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                <Columns>
                    <telerik:GridEditCommandColumn ItemStyle-Width="20px" />
                    <telerik:GridBoundColumn DataField="Date" HeaderText="Date" />
                    <telerik:GridBoundColumn DataField="Rate" HeaderText="Rate" />
                    <telerik:GridButtonColumn ConfirmText="确定删除此记录?" ConfirmDialogType="RadWindow" ConfirmDialogHeight ="120" ConfirmDialogWidth="240" 
                        ConfirmTitle="删除确认" ButtonType="FontIconButton" CommandName="Delete" ItemStyle-Width="20px" />
                </Columns>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
            <ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>

Eyup
Telerik team
 answered on 20 Jun 2016
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?