找回密码
 立即注册

QQ登录

只需一步,快速开始

cuizhengrong

注册会员

7

主题

21

帖子

74

积分

注册会员

积分
74

活字格认证

cuizhengrong
注册会员   /  发表于:2018-12-21 20:49  /   查看:3739  /  回复:5
1. 前端代码部分,在C1GRIDVIEW中保存了这个自定义的模板样式;在不用模板的情况下可以正常调用样式;但是使用了模板之后,保存样式,运行时调用
   却不能显示出来正常的样式;在模板中使用 <table>...</table>定义的模板也不能调用样式;但是不用样式可以正常使用模板


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="testBootStrap.WebForm1" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4" Namespace="C1.Web.Wijmo.Controls.C1GridView" TagPrefix="wijmo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Button ID="btnLoad" Text="加载样式" runat="server" />
        <asp:Button ID="btnLoad2" Text="加载样式2" runat="server" />

        <div>
            <wijmo:C1GridView ID="C1GridView1" runat="server" AllowVirtualScrolling="False" AutogenerateColumns="False" Culture="zh-CN" DataKeyNames="mobile" DataSourceID="SqlDataSource1" FreezingMode="None" RowHeight="19" ScrollMode="None" StaticColumnIndex="-1" StaticRowIndex="-1">
                <Columns>
                    <wijmo:C1TemplateField>
                        <HeaderTemplate>
                            <aspabel runat="server" Text="姓名"></aspabel>
                            <br />
                            <aspabel runat="server" Text="手机"></aspabel>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:TextBox runat="server" Text='<%# Eval("name") %>'></asp:TextBox>
                            <br />
                            <asp:TextBox runat="server" Text='<%# Eval("mobile") %>'></asp:TextBox>
                        </ItemTemplate>
                    </wijmo:C1TemplateField>
                </Columns>
            </wijmo:C1GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:txlConnectionString %>" SelectCommand="SELECT * FROM [txl]"></asp:SqlDataSource>
        </div>
    </form>
</body>
</html>

2.后台代码
    Protected Sub btnLoad_Click(sender As Object, e As EventArgs) Handles btnLoad.Click
        Dim f As String = Server.MapPath("~/") & "layout01.xml"
        Me.C1GridView1.LoadLayout(f)
        Me.C1GridView1.DataBind()

    End Sub

    Protected Sub btnLoad2_Click(sender As Object, e As EventArgs) Handles btnLoad2.Click
        Dim f As String = Server.MapPath("~/") & "layout02.xml"
        Me.C1GridView1.LoadLayout(f)
        Me.C1GridView1.DataBind()

    End Sub


5 个回复

倒序浏览
cuizhengrong
注册会员   /  发表于:2018-12-21 20:50:54
沙发
使用的是VER2018Q2试用版
回复 使用道具 举报
JeffryLI
葡萄城公司职员   /  发表于:2018-12-24 11:40:41
板凳
您好,请把具体的版本号给我,我们没有2018Q2的版本,这个问题,我们需要重现,请上传您的这个demo,因为我们无法获得layout.xml,谢谢
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
cuizhengrong
注册会员   /  发表于:2019-7-30 18:04:40
地板
JeffryLI 发表于 2018-12-24 11:40
您好,请把具体的版本号给我,我们没有2018Q2的版本,这个问题,我们需要重现,请上传您的这个demo,因为我 ...

见附件;加载样式文件 2.xml不成功

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
cuizhengrong
注册会员   /  发表于:2019-7-30 18:10:17
5#
该附件的c1griddata的版本是 4.0.20172.271
回复 使用道具 举报
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2019-7-30 23:57:42
6#
好的,明天帮你验证问题
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部