Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何在gridview中将一个单元格分成正好相等的两行_Asp.net_Gridview - Fatal编程技术网

Asp.net 如何在gridview中将一个单元格分成正好相等的两行

Asp.net 如何在gridview中将一个单元格分成正好相等的两行,asp.net,gridview,Asp.net,Gridview,我有一个网格视图,其中我需要将一个单元格分成两个相等的行 在这里我可以分开,但我不能分成相等的部分 如何将一个单元格精确地分成两行 这是我的密码 更新了一个 <Wizard:WizardGridView ID="gvresmgt" runat="server" AllowPaging="False" AllowSorting="True" AutoGenerateColumns="false" WizardCustomPager="False" EnableModelVal

我有一个网格视图,其中我需要将一个单元格分成两个相等的行

在这里我可以分开,但我不能分成相等的部分

如何将一个单元格精确地分成两行

这是我的密码

更新了一个

<Wizard:WizardGridView ID="gvresmgt" runat="server" AllowPaging="False"       AllowSorting="True" 
 AutoGenerateColumns="false" WizardCustomPager="False" EnableModelValidation="True"   CssClass="style1" ShowHeader="False" >
 <Columns>
 <asp:TemplateField >
 <ItemStyle Width="100px" HorizontalAlign="left" />
 <ItemTemplate>
 <asp:Label runat="server" ID="lblTitle" Text='<%# Eval("BGP_ID")%>' ></asp:Label>
 </ItemTemplate>
 </asp:TemplateField>
 <asp:TemplateField >
 <ItemStyle Width="100px" HorizontalAlign="Center" />
 <ItemTemplate>
  <asp:Label runat="server" ID="lblDescription" Text='<%# Eval("BGP_DESC")%>' >            </asp:Label>
 </ItemTemplate>
 </asp:TemplateField>
 <asp:TemplateField>
<ItemStyle Width="100px" HorizontalAlign="Center" />
<ItemTemplate>
**<div id="1" style="border-bottom: solid 1px #C0C0C0">
    <asp:Label runat="server" ID="lblPlanStart" Font-Bold="true" Text="Projects"></asp:Label>
                                                    <br/>
                                                    <br/>
               </div>
     <asp:Label runat="server" ID="Label3" Font-Bold="true" Text="SubTotal"></asp:Label>  **
 </ItemTemplate>
 </asp:TemplateField>
</Columns>
</Wizard:WizardGridView>

**


**
尝试将高度设置为一半

<ItemStyle Width="100px" Height="20px" HorizontalAlign="Center" />
<ItemTemplate>
 <table style="border: 1px solid black;">
   <tr>
    <td style="border: 1px solid black;">
      <asp:Label runat="server" ID="lblPlanStart" Font-Bold="true" Text="Unknown"></asp:Label>
    </td>
    </tr>
   <tr>
    <td style="border: 1px solid black;">
      <asp:Label runat="server" ID="lblPlanStart" Font-Bold="true" Text="Projects"></asp:Label>
    </td>
    </tr>
    <tr>
      <td style="border: 1px solid black;">
        <asp:Label runat="server" ID="Label3" Font-Bold="true" Text="SubTotal"></asp:Label>    
      </td>
    </tr>
 </table>
</ItemTemplate>


您好,这是我的网格图像……我可以分成两行……这两行看起来很难看。。。我需要精确地分成两行。。。。。谢谢@anilThen尝试使用合并行。请按此链接或。使用“合并”时可以设置任何条件如果希望所有行都像这样,则在合并行时使用常量很好,但我的网格处于设计中…所以如何在设计模式中更改OK正常,但看起来像这样我需要在它们之间画一条线,我的意思是在项目和小计之间…因为我需要更多的列来表示data…@anilpab我认为div样式添加了这一行。不知道你是否错过了。尝试
删除
您的
自定义高度和宽度
@anilpap如果该答案解决了您的问题,请不要忘记将其标记为答案。