Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
629 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
311 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
99 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
1 answer
89 views

Hi,

We have been using Telerik RadComboBox control in our application which has been working perfectly in .NET Framework 3.5

We recently moved to .NET Framework 4.5 and now these RadComboBox stopped firing the server side javascript alert. When we are debugging, it is calling the function but alert is not getting popped out post completion of the call.

Any suggestion are highly appreciated.

Regards,

Bhavani

 

 

 

Veselin Tsvetanov
Telerik team
 answered on 20 Jun 2016
2 answers
241 views

I cannot get this to work with masterpage and radajaxmanagerproxy:

https://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultvb.aspx?product=tooltip

the tooltips are dissappearing immediately after the usercontrol is loaded into the tooltip, so I guess AJAX is not running properly.

.

Any suggestions?

 

Thanks,

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 20 Jun 2016
1 answer
239 views
Hello, in my OnSelectedIndexChanged function I want to get some custom attributes from the item selected. ((RadComboBox)sender).SelectedItem is null and the event argument seems to only have the text and value properties available. Is there any way to do this?
Ivan Danchev
Telerik team
 answered on 20 Jun 2016
6 answers
262 views

Pretty simple issue here: when my RadMap is rendered, the markers don't appear.

If I hover over the point where they should be, I see the pop-up, but I cannot get the physical pinTarget or pin markers to show on the map. I've tried implementing various ways according to the demos and nothing is working. I'm looking to implement via Server-Side Data Binding; I've literally copied the code exactly from the demo and pasted into my solution and it will not work. I am currently running Telerik version 2016.1.113.40

Any help would be greatly appreciated.

 

Thanks!

Ianko
Telerik team
 answered on 20 Jun 2016
1 answer
137 views

Hi,

 

I am New to this forum and use of Telrik product also.

We have a application developed around 5 years back and i see Telerik controls are used in the box. to migrate the running application from the existing server to new server do we need to install Telerik software on the new server as well?, we are not changing/enhancing anything in the existing application.

I would appreciate your help.

 

Thanks,

PC Rao

 

Marin Bratanov
Telerik team
 answered on 20 Jun 2016
3 answers
140 views
Hi Telerik team,

I have a Treeview, and the user can drag & drop items from other controls onto it, and then I create a user control dynamically and add it to the node. Also, the user can move these nodes up and down with drag & drop, and everything works fine so far. One type of user control that is created in this process, contains another treeview. Drag & drop from other controls to this 'child' treeview also works fine, but now this node cannot be be moved up and down, as the drag no longer works for this node.

In summary, when node 'A' in treeview 'tvA' contains in its nodeTemplate, a user control which has another treeview, 'tvB', the drag does not work for node 'A'. Everything is created from code behind. I haven't tested to see if it works when done from markup, but that wouldn't work for me anyway.

Thanks for your help,
Regards,
Safa
Peter Milchev
Telerik team
 answered on 17 Jun 2016
1 answer
264 views
I am using RadDiagram. It looks like the control doesn't offer the ability of changing font sizes for the texts in shapes. Is there any workaround to change font sizes?
 
Vessy
Telerik team
 answered on 17 Jun 2016
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?