LoadOptions لـ GridWeb

** تحميل مع ترميز آخر**

بالنسبة لملف csv ، فهو في الواقع ملف نصي ، بدون الترميز المحدد الموضح في ملف تنسيق xlsx.

لذلك ، يمكن للمستخدمين تعيين ترميز أحرف معين قبل تحميل الملف.

إليك نموذج كود للتحميل بالصينية:

    GridTxtLoadOptions topt = new GridTxtLoadOptions();
    topt.Encoding = (Encoding.GetEncoding("GB2312"));
    GridWeb1.LoadOptions = topt;
    String filePath = Server.MapPath("~/workbook/chinesefile.csv");
    GridWeb1.ImportExcelFile(filePath);