[CLOSED] Custom Localized string in Grid Command Confirmation Messages and Title

  1. #1

    [CLOSED] Custom Localized string in Grid Command Confirmation Messages and Title

    Hi Team,

    Is there any way to pass custom localized string for Confirmirmation "Message" and "Title" in grid panel command direct events ?

    For example

    <Confirmation ConfirmRequest="true" BeforeConfirm="return (command == 'DeleteLeave');"
                            Message="Are you sure you want to delete this record?" Title="Leave" />
    For the Message Attribute, I would like to pass a generic Message which comes from Global Resources and Title might be current "Page Title".

    Regards,
    Last edited by Daniil; Feb 14, 2011 at 1:29 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Not sure what exactly problem you have with Global resources.

    I just tested it and it appears to be working fine through standard Asp.Net localization mechanism.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("DirectEvent", "Hello from Server!").Show();
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Click me">
            <DirectEvents>
                <Click OnEvent="TestDirectEventHandler">
                    <Confirmation 
                        ConfirmRequest="true"
                        Title="<%$ Resources:Resource, Title1 %>"
                        Message="<%$ Resources:Resource, Message1 %>" />
                </Click>
            </DirectEvents>
        </ext:Button>
        </form>
    </body>
    </html>
    Resource.resx
    Click image for larger version. 

Name:	Resource.JPG 
Views:	155 
Size:	21.6 KB 
ID:	2310
  3. #3
    Hi Daniil,

    Thank you very much! This is what exactly we want. Actually I have forgotten that, this has been mentioned in 1.0 change log (CHANGELOG.TXT) file.

    Regards,
  4. #4
    Quote Originally Posted by vedagopal2004 View Post
    Hi Daniil,

    Thank you very much! This is what exactly we want. Actually I have forgotten that, this has been mentioned in 1.0 change log (CHANGELOG.TXT) file.

    Regards,
    Glad to help:) Could you clarify what record in changelog.txt do you mean? I don't understand.
  5. #5
    Hi Daniil,

    Sorry for confusing you. Actually I have read some where on the ext net forum, that All these title / message attributes strings can be replaced with server side binding i.e. <%$ Any Server Side Property %>. It is not in the CHANGELOG.txt provided with Ext.Net Source Code
    Ext.Net -> Build -> Ext.Net -> CHANGELOG.txt. (Version Change Log)

    Regards,
  6. #6
    Thanks for the clarification.

Similar Threads

  1. How to Localize Command Confirmation?
    By reezvi in forum 1.x Help
    Replies: 0
    Last Post: May 07, 2012, 3:46 PM
  2. Replies: 2
    Last Post: Jan 09, 2012, 7:18 AM
  3. Help GridPanel Command Confirmation
    By libra163 in forum 1.x Help
    Replies: 2
    Last Post: Oct 25, 2011, 6:40 AM
  4. [CLOSED] Confirmation in command column
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 05, 2010, 4:04 PM
  5. [CLOSED] DirectEvents - Confirmation with custom text on buttons
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 19, 2010, 2:02 PM

Tags for this Thread

Posting Permissions