DataKeyNames 行关键字段 DataIFrameUrlFields 用于url后面传值
<f:Grid ID="Grid2" Title="Grid2" PageSize="10" ShowBorder="true" BoxFlex="1" AllowPaging="true" IsDatabasePaging="false"
ShowHeader="false" runat="server" EnableCheckBoxSelect="true"
DataKeyNames="Id,Name" OnSort="Grid2_Sort">
<Columns>
<f:RowNumberField />
<f:BoundField Width="100px" DataField="Name" DataFormatString="{0}" HeaderText="姓名" />
<f:TemplateField Width="80px" HeaderText="性别">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# GetGender(Eval("Gender")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width="80px" DataField="EntranceYear" HeaderText="入学年份" />
<f:CheckBoxField Width="80px" RenderAsStaticField="true" DataField="AtSchool" HeaderText="是否在校" />
<f:HyperLinkField HeaderText="所学专业" DataToolTipField="Major" DataTextField="Major"
DataTextFormatString="{0}" DataNavigateUrlFields="Major" DataNavigateUrlFormatString="http://gsa.ustc.edu.cn/search?q={0}"
UrlEncode="true" Target="_blank" ExpandUnusedSpace="true" MinWidth="150px" />
<f:ImageField Width="80px" DataImageUrlField="Group" DataImageUrlFormatString="~/res/images/16/{0}.png"
HeaderText="分组">
</f:ImageField>
<f:WindowField TextAlign="Center" Width="80px" WindowID="Window1" Icon="Pencil"
ToolTip="编辑" DataIFrameUrlFields="Id,Name" DataIFrameUrlFormatString="./grid_iframe_reload_window.aspx?id={0}&name={1}"
Title="编辑" IFrameUrl="~/alert.aspx" />
</Columns>
</f:Grid>