Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views

I'm wondering how I would handle localizations.
As the datasource backend I chose to use a webservice. Unfortunately I'm unable to pass additional arguments to the webservice.
I was under the impression I could add values to the context object (which in fact is a Dictionary<string, object>)... but somehow it doesn't really work.

I added that javascript snippet to the page containing the menu:
    function itemPopulating(sender, eventArgs) {
        var item = eventArgs.get_item();
        var context = eventArgs.get_context();
        context["CategoryID"] = item.get_value();
    }

context["culture"] = #<%# CultureInfo.CurrentCulture.ToString() &>':?
If I could pass CultureInfo.CurrentCulture.ToString() I could handle localization in my webservice backend.. not sure if that goes very well with caching though. As for the statically defined items in the aspx page I could probably use the asp ResourceManager right?

<telerik:RadMenuItem Text="One (en-US)" Value="1" ExpandMode="WebService">
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Two (en-US)" Value="1">
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Three (en-US)" Value="1">
</telerik:RadMenuItem>

Oh and btw.. the local live sample (radmenu with webservice) doesn't work :-/
If I remember correctly I encountered sql exceptions while trying to fill the datatable.
I hope I didn't break the solution when elevating it to .net 3.5.

TIA :-)

Roman Sommer
Top achievements
Rank 1
 answered on 02 Feb 2009
2 answers
281 views
Hi everybody,

I experience a strange behaviour using the RadWindow in a page with a master page. I have a simple button and want the RadWindow to open when the button is clicked. This works perfectly well in any page without a master page but fails if a master page is associated to the page.

Here is the code block I use within the pages:

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"
    </telerik:RadStyleSheetManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    </telerik:RadAjaxManager> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        <Windows> 
            <telerik:RadWindow ID="DialogWindow" runat="server" Behavior="Default" InitialBehavior="None" 
                OpenerElementID="btnTest" VisibleOnPageLoad="False" Modal="true" VisibleTitlebar="False" 
                VisibleStatusbar="False" NavigateUrl="Dialog.aspx"
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 
    <asp:Button ID="btnTest" runat="server" Text="Button" /> 

Moving the Rad...Managers between the page and its master page (and using proxies) didn't solve the problem.

Strangely, setting the VisibleOnPageLoad attribute to true, causes the RadWindow to show up in both versions. Then, it is also possible to close the window and open it with the button! Unfortunatelly showing the window on page load is not the behaviour I need.

I also compared the rendered html / script code and it looks identical in both versions - just different names and prefixes for the rendered elements.

Any help is much appreciated.
Thanks,
Markus


Markus
Top achievements
Rank 1
 answered on 02 Feb 2009
1 answer
171 views
Hi,
I'm using RadGrid 6.0 with Q3 2007 sp2.  When the textbox got selected or got the focus then the current row should be selected.

Please go through aspx code...
---------------------
<radg:RadGrid ShowFooter="True" ID="radLists" runat="server" AllowPaging="True" AllowSorting="True"
            GridLines="None" Skin="Default" 
            PageSize="15" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" Width="100%" EnableAJAX="True" ShowStatusBar="True">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="PKey" CommandItemDisplay="TopAndBottom">
                <Columns>
                <rad:GridClientSelectColumn UniqueName="ClientSelectColumn" Visible="False"  />
                    <rad:GridTemplateColumn DataField="VoucherNumber" HeaderText="Voucher #" UniqueName="VoucherNumber">
                        <HeaderTemplate>
<asp:LinkButton id="lbVoucherNumber" runat="server" CssClass="Link" Text="Voucher #" CommandArgument="VoucherNumber" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lbVoucherNumber_Command" BackColor="Transparent"></asp:LinkButton><BR /><asp:DropDownList id="rcmbVoucherNumber" runat="server" CssClass="ComboBox" AutoPostBack="True" OnSelectedIndexChanged="rcmbVoucherNumber_SelectedIndexChanged">
                            </asp:DropDownList><asp:ImageButton id="imgVoucherNumber" runat="server" ToolTip="Reset the Filter" ImageUrl="~/Images/action_refresh.gif" OnClick="imgVoucherNumber_Click"></asp:ImageButton>
</HeaderTemplate>
                        <ItemTemplate>
<asp:Label id="VoucherNumberLabel" runat="server" Text='<%# Eval("VoucherNumber") %>' ></asp:Label>
</ItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn DataField="DueDate" HeaderText="Due Date" UniqueName="DueDate">
                        <EditItemTemplate>
<asp:TextBox id="DueDateTextBox" runat="server" Text='<%# Bind("DueDate", "{0:dd-MMM-yy}") %>' ></asp:TextBox>
</EditItemTemplate>
                          <HeaderTemplate>
<asp:LinkButton id="lbDueDate" runat="server" CssClass="Link" Text="Due Date" CommandArgument="DueDate" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lbDueDate_Command" BackColor="Transparent"></asp:LinkButton><BR /><asp:DropDownList id="rcmbDueDate" runat="server" CssClass="ComboBox" AutoPostBack="True" OnSelectedIndexChanged="rcmbDueDate_SelectedIndexChanged">
                            </asp:DropDownList><asp:ImageButton id="imgDueDate" onclick="imgDueDate_Click" runat="server" ToolTip="Reset the Filter" ImageUrl="~/Images/action_refresh.gif"></asp:ImageButton>
</HeaderTemplate>
                        <ItemTemplate>
<asp:Label id="DueDateLabel" runat="server" Text='<%# Eval("DueDate", "{0:dd-MMM-yy}") %>'></asp:Label>
</ItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn DataField="SubAccountName" HeaderText="Sub Acc Name" UniqueName="SubAccountName">
                        <EditItemTemplate>
<asp:TextBox id="SubAccountNameTextBox" runat="server" Text='<%# Bind("SubAccountName") %>' ></asp:TextBox>
</EditItemTemplate>
                          <HeaderTemplate>
<asp:LinkButton id="lbSubAccountName"  runat="server" CssClass="Link" Text="Sub Acc Name" OnCommand="lbSubAccountName_Command" ForeColor="White" Font-Underline="False" Font-Bold="True" CommandArgument="SubAccountName" BackColor="Transparent" ></asp:LinkButton><BR /><asp:DropDownList id="rcmbSubAccountName" runat="server" CssClass="ComboBox" AutoPostBack="True" Width="150px" OnSelectedIndexChanged="rcmbSubAccountName_SelectedIndexChanged" >
                            </asp:DropDownList><asp:ImageButton id="imgSubAccountName"  runat="server" ToolTip="Reset the Filter" ImageUrl="~/Images/action_refresh.gif" ></asp:ImageButton>
</HeaderTemplate>
                        <ItemTemplate>
<asp:Label id="SubAccountNameLabel" runat="server" Text='<%# Eval("SubAccountName") %>' ></asp:Label>
</ItemTemplate>
                        <HeaderStyle Width="150px" />
                        <ItemStyle Width="150px" />
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn DataField="Amount_FC" HeaderText="Amount" UniqueName="Amount_FC">
                          <HeaderTemplate>
                            <asp:LinkButton ID="lbAmount_FC" runat="server" BackColor="Transparent" CommandArgument="Amount_FC"
                                CssClass="Link" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lbAmount_FC_Command"
                                Text="Amount" ></asp:LinkButton><br />
                            <asp:DropDownList ID="rcmbAmount_FC" runat="server" AutoPostBack="True" CssClass="ComboBox"
                                OnSelectedIndexChanged="rcmbAmount_FC_SelectedIndexChanged">
                            </asp:DropDownList><asp:ImageButton ID="imgAmount_FC" runat="server" ImageUrl="~/Images/action_refresh.gif"
                                OnClick="imgAmount_FC_Click" ToolTip="Reset the Filter" />
                       
</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Amount_FCLabel" runat="server" Text='<%# Eval("Amount_FC", "{0:###,###,###,###.#0}") %>' ></asp:Label>
                       
</ItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn DataField="BalanceAmount" HeaderText="Balance" UniqueName="BalanceAmount">
                        <EditItemTemplate>
                            <asp:TextBox ID="BalanceAmountTextBox" runat="server" Text='<%# Bind("BalanceAmount", "{0:###,###,###,###.#0}") %>'></asp:TextBox>
                       
</EditItemTemplate>
                          <HeaderTemplate>
                            <asp:LinkButton ID="lbBalanceAmount" runat="server" BackColor="Transparent" CommandArgument="BalanceAmount"
                                CssClass="Link" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lbBalanceAmount_Command"
                                Text="Balance"></asp:LinkButton><br />
                            <asp:DropDownList ID="rcmbBalanceAmount" runat="server" AutoPostBack="True" CssClass="ComboBox"
                                OnSelectedIndexChanged="rcmbBalanceAmount_SelectedIndexChanged">
                            </asp:DropDownList><asp:ImageButton ID="imgBalanceAmount" runat="server" ImageUrl="~/Images/action_refresh.gif"
                                OnClick="imgBalanceAmount_Click" ToolTip="Reset the Filter" />
                       
</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="BalanceAmountLabel" runat="server" Text='<%# Eval("BalanceAmount", "{0:###,###,###,###.#0}") %>'></asp:Label>
                       
</ItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn DataField="CurrencyID" HeaderText="Ccy" UniqueName="CurrencyID">
                          <HeaderTemplate>
<asp:LinkButton id="lbCurrencyID" onclick="lbCurrencyID_Click" runat="server" CssClass="Link" Text="Ccy" BackColor="Transparent" CommandArgument="CurrencyID" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lbSettledAmount_Command" ></asp:LinkButton><BR />
<asp:DropDownList id="rcmbCurrencyID" runat="server" CssClass="ComboBox" AutoPostBack="True" OnSelectedIndexChanged="rcmbCurrencyID_SelectedIndexChanged" >
                            </asp:DropDownList><asp:ImageButton id="imgCurrencyID" onclick="imgSettledAmount_Click" runat="server" ImageUrl="~/Images/action_refresh.gif" ToolTip="Reset the Filter" ></asp:ImageButton>
</HeaderTemplate>
                        <ItemTemplate>
<asp:Label id="lblCurrency" runat="server" Text='<%# Eval("CurrencyID") %>' ></asp:Label>
</ItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn UniqueName="Template1" HeaderText="Amount FC" >
                       <footertemplate>
                       
</footertemplate>
                         <HeaderTemplate>
<asp:LinkButton id="lblAmountFC" runat="server" CssClass="Link" Text="Amount FC" BackColor="Transparent" OnCommand="lblAmountFC_Command" ForeColor="White" Font-Underline="False" Font-Bold="True" CommandArgument="Amount_FC" Enabled="False" ></asp:LinkButton>
</HeaderTemplate>
                        <ItemTemplate>
<radi:RadNumericTextBox id="txtCurrentPayment" runat="server" AutoPostBack="True" Width="100px" CausesValidation="True" DbValue='<%# Eval("CurrentPayment") %>' Culture="English (United States)" LabelCssClass="radLabelCss_Default" OnTextChanged="txtCurrentPayment_TextChanged" >
<IncrementSettings InterceptArrowKeys="False" InterceptMouseWheel="False"></IncrementSettings>

<ClientEvents OnFocus="Focus"></ClientEvents>

<NumberFormat AllowRounding="True" DecimalDigits="3"></NumberFormat>
</radi:RadNumericTextBox> <radi:RadNumericTextBox id="rntExchangeRate" runat="server" Width="100px" Visible="False" Skin="" DbValue='<%# Eval("ExchangeRate") %>' Culture="English (United States)" LabelCssClass="radLabelCss_Default" OnTextChanged="txtCurrentPayment_TextChanged" >
<IncrementSettings InterceptArrowKeys="False" InterceptMouseWheel="False"></IncrementSettings>

<NumberFormat AllowRounding="True" DecimalDigits="3"></NumberFormat>
</radi:RadNumericTextBox>
</ItemTemplate>
                        <HeaderStyle Width="100px" />
                        <ItemStyle Width="100px" />
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn HeaderText="Amount LC"
                        UniqueName="CurrentPayment_BC">
                          <HeaderTemplate>
<asp:LinkButton id="lblAmountLC" runat="server" CssClass="Link" Text="Amount LC" Enabled="False" CommandArgument="Amount_BC" Font-Bold="True" Font-Underline="False" ForeColor="White" OnCommand="lblAmountBC_Command" BackColor="Transparent"></asp:LinkButton>
</HeaderTemplate>
                        <ItemTemplate>
<radi:RadNumericTextBox id="txtCurrentPaymentBC" runat="server" Width="100px" OnTextChanged="txtCurrentPaymentBC_TextChanged" LabelCssClass="radLabelCss_Default" Culture="English (United States)" DbValue='<%# Eval("CurrentPayment") %>' >
<IncrementSettings InterceptArrowKeys="False" InterceptMouseWheel="False"></IncrementSettings>

<NumberFormat AllowRounding="True" DecimalDigits="3"></NumberFormat>
</radi:RadNumericTextBox>
</ItemTemplate>
                    </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn UniqueName="Template2" >
                                                    <ItemTemplate>
<asp:LinkButton id="lbPaythis" onclick="lbPaythis_Click" runat="server" Width="50px" CommandArgument='<%# Bind("PKey") %>' CommandName="Select">Pay this</asp:LinkButton>
</ItemTemplate>
                                        <footerstyle verticalalign="Middle" horizontalalign="Right" wrap="False" />
                                        <HeaderStyle verticalalign="Middle" horizontalalign="Right" wrap="False" />
                                        <ItemStyle horizontalalign="Right" wrap="False" />
                                    </rad:GridTemplateColumn>
                                </Columns>
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Resizable="False" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                <CommandItemTemplate>
                    <table class="MainTable" style="height: 55%" width="100%">
                        <tr>
                            <td align="right" colspan="5" style="width: 95%" valign="top">
                                <asp:Button ID="btnPayAll" runat="server" CssClass="Button" OnClick="btnPayAll2_Click"
                                    Text="Pay All" Width="80px" />
                                &nbsp; &nbsp;
                            </td>
                            <td valign="top">
                                <asp:ImageButton ID="btnSave2" runat="server" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
                                    BorderStyle="Solid" BorderWidth="3px" CssClass="IconButton" ImageUrl="~/Images/Save.ico"
                                    OnClick="btnSave2_Click" ToolTip="Save" />
                            </td>
                            <td valign="top">
                                <asp:ImageButton ID="btnUndo2" runat="server" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
                                    BorderStyle="Solid" BorderWidth="3px" ImageUrl="~/Images/Undo.ico" OnClick="btnUndo2_Click"
                                    ToolTip="Undo" />
                            </td>
                        </tr>
                    </table>
                </CommandItemTemplate>
                            </MasterTableView>
                            <ClientSettings AllowKeyboardNavigation="True" >
                                <Selecting AllowRowSelect="True" />
                                <ClientEvents OnActiveRowChanged="ActiveRowChanged"  OnGridCreated="GridCreated" OnActiveRowChanging="ActiveRowChanging" OnRowMouseOver="RowMouseOver" OnRowSelected="RowSelected" />
                            </ClientSettings>
                        </radg:RadGrid>





Princy
Top achievements
Rank 2
 answered on 02 Feb 2009
1 answer
174 views
I am dynammically creating a RadGrid on a Web User Control that is also added to the web form dynamically.  I am calling DataBind() after each RadGrid creation on PageLoad and not utilizing NeedDataSource.  I am trying to insert/update in an automatically generated edit form, which is rendering nicely, except that the Insert and Update Commands are not firing.  I wish to catch the Insert and Update Commands to perform the record insert/updates - but those events are not firing after clicking on the insert and update links on the edit forms.  I cannot use any Automatic inserting or updating and wish to perform the CRUD methods manually.  Am I expecting too much from this control to handle all of this runtime generation?

                RadGrid radgrid = new RadGrid();
                radgrid.ID = "uc_attributeValues" + categoryAttributeID;
                radgrid.MasterTableView.DataKeyNames = new string[] { "KeepHistoryGroupID" };
                radgrid.AutoGenerateColumns = false;
                radgrid.Skin = "Vista";
                radgrid.Width = Unit.Percentage(95);
                radgrid.EnableViewState = true;
                radgrid.AllowAutomaticInserts = false;
                radgrid.AllowAutomaticUpdates = false;
                radgrid.AllowAutomaticDeletes = false;
                radgrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
                radgrid.ItemCommand += new GridCommandEventHandler(radgrid_ItemCommand);
                radgrid.ClientSettings.Selecting.AllowRowSelect = true;
                radgrid.UpdateCommand += new GridCommandEventHandler(radgrid_UpdateCommand);
                radgrid.InsertCommand += new GridCommandEventHandler(radgrid_InsertCommand);


Nikolay Rusev
Telerik team
 answered on 02 Feb 2009
1 answer
106 views
Hello,

I just DL the latest trial of RadControls for ASP.NET and first thing that i noticed was that Telerik.Charting.dll is missing.
Does it mean that now you have moved the charting to the Telerik.Web.UI.dll too ?
I didn't notice anything wrong but i just want to know .. my client already consider the idea to buy the latest version cuz we are struggling with an old version 2007Q1.
 
Regards
Paul
Telerik team
 answered on 02 Feb 2009
2 answers
142 views
Hi,

I am using a rad grid and wish to show a checkbox in it. I am using GridCheckBoxColumn for showing this checkbox and setting its DataField property to the column of the table so that this checkbox shows values from the database.

The problem I am facing is that the checkbox is shown readonly. I would like the user to be able to change the value of the checkbox by clicking it. And after user clicks the checkbox I would like to postback to server and update the server.

If I use inline editing then I do not wish to show the "Edit" links so that user can directly edit the checkbox without first clicking edit link.

Can someone please help...

Thanks,
- Manoj
Manoj
Top achievements
Rank 1
 answered on 02 Feb 2009
1 answer
74 views
I've got a UserControl that I want to use as the edit form inside a grid. The DataItem is a structure with a collection of classes inside. When I click the Edit button to bring up the grid the DataItem I get is fine, but then when I click the button that fires the UpdateCommand event the DataItem I receive a DataItem without any of the classes that should be inside it (the collection in the structure is null).

I also don't understand why the grid would later fire NeedDataSource *after* setting DataItem?
Nikolay Rusev
Telerik team
 answered on 02 Feb 2009
1 answer
101 views
Hi,

   Would any one suggest link for javascript where i could learn from scratch to maximum level.


Thanks,
Nagarjun S
Nikolay Rusev
Telerik team
 answered on 02 Feb 2009
1 answer
111 views
Hi, 

I just updatedTelerik.Web.UI.dll file and I got error message which I didn't encounter before upgrade. The error message is
Object doesn't support this property or method. I found if there is a RadDatePicker on that page, the error will popup.

Can anyone help me out on this issue. 

Thanks

Anthony
Shinu
Top achievements
Rank 2
 answered on 02 Feb 2009
1 answer
309 views
I have used the rad wiindow for popup and enter some data then save it to the database . i want to refresh the combo box when the rad windoe is closed.
i have wrriten the code leike this

function

openRadWindow(CustomerID)

 

{

 

var oWnd = radopen("AddPopup.aspx?CustomerID=" + CustomerID, "RadWindow1" );

 

oWnd.Center();

oWnd.add_close(OnClientCloseWin);

 

}

 

function OnClientCloseWin()

 

{

 

var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");

 

ajaxManager.ajaxRequestWithTarget(

'<%= btn.UniqueID %>', '');

 

 

}
its working fine in asp.net pages, but not support in master-content pages.
this code  loads the page every time when cliking the button.

i need to call server side function without postbacking....

please reply me immediately...

Shinu
Top achievements
Rank 2
 answered on 02 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?