예제 #1
0
        protected override void OnCustomDataCallback(CustomDataCallbackEventArgs e)
        {
            base.OnCustomDataCallback(e);
            int index;

            if (int.TryParse(e.Parameter, NumberStyles.Integer, CultureInfo.InvariantCulture, out index))
            {
                FocusedIndex = index;
            }
        }
 protected void htmlEditor_CustomDataCallback(object sender, CustomDataCallbackEventArgs e)
 {
     if (!String.IsNullOrEmpty(e.Parameter))
     {
         var filepath = String.Format("~/{0}", e.Parameter);
         var filename = MapPath(filepath);
         using (var reader = new StreamReader(filename)) {
             var text = reader.ReadToEnd();
             e.Result = text;
         }
     }
 }
    protected void he_CustomDataCallback(object sender, CustomDataCallbackEventArgs e)
    {
        ASPxHtmlEditor editor = sender as ASPxHtmlEditor;

        switch (e.Parameter)
        {
        case "Save":
            string rtf = string.Empty;
            using (MemoryStream ms = new MemoryStream()) {
                editor.Export(HtmlEditorExportFormat.Rtf, ms);
                ms.Flush();
                ms.Position = 0;
                using (StreamReader sr = new StreamReader(ms)) {
                    rtf = sr.ReadToEnd();
                }
            }
            SaveToDB(rtf);
            break;
        }
    }
예제 #4
0
 protected override void OnCustomDataCallback(CustomDataCallbackEventArgs e)
 {
     base.OnCustomDataCallback(e);
     int index;
     if (int.TryParse(e.Parameter, NumberStyles.Integer, CultureInfo.InvariantCulture, out index))
         FocusedIndex = index;
 }
예제 #5
0
 private void Dashboard1_CustomDataCallback(object sender, CustomDataCallbackEventArgs e)
 {
     AlertBox.Show(e.Parameter);
 }