aspx page
<telerik:RadGrid runat="server" ID="radGridAppeals" ShowHeader="true" PagerStyle-AlwaysVisible="true" EnableEmbeddedBaseStylesheet="True" MasterTableView-PagerStyle-AlwaysVisible="true">
<MasterTableView AutoGenerateColumns="false" ShowHeadersWhenNoRecords="true" AllowPaging="true">
<Columns>
<telerik:GridBoundColumn HeaderText="S.No." UniqueName="sno" DataField="sno" />
<telerik:GridBoundColumn HeaderText="Zone" />
<telerik:GridBoundColumn HeaderText="Branch" />
<telerik:GridTemplateColumn HeaderText="Appeal No./Branch Initiation Date/Date Filing Appeal/Appeal CNR No." >
<ItemTemplate>
<asp:LinkButton ID="lnkRedirectToDetailsScreen" CommandArgument='<%#Eval("ApplicationId") +";"+ Eval("ApplicationType")+";"+ Eval("ACK")+";"+ Eval("FileUserTypeId")+";"+ Eval("IsMigrated")+";"+ Eval("IsSetupDone")+";"+ Eval("ReferenceId")+";"+ Eval("ReferenceType")+";"+ Eval("TrackingId")%>'
runat="server" CausesValidation="false" CommandName="RedirectToDetailsScreen">
</asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="15%" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderText="RC No./Date Registration/Case title CC No./Date Sheet/CC CNR No" />
<telerik:GridBoundColumn HeaderText="Subject" />
<telerik:GridBoundColumn HeaderText="Court Name/State" />
<telerik:GridBoundColumn HeaderText="Date of Initiation/Next Date of Hearing" />
<telerik:GridBoundColumn HeaderText="Current Status" />
<telerik:GridTemplateColumn HeaderText="Action" Visible="true" >
<ItemTemplate>
<asp:UpdatePanel runat="server" ID="viewEditUpdatePanel">
<ContentTemplate>
<asp:LinkButton ID="lnkGrdAppealsView" runat="server" ToolTip="View" CommandName="Select" CommandArgument='<%# Eval("preliminaryenquiryid") + ";"+ Eval("fileid") + ";"+ Eval("filetrackingid")%>' Font-Underline="false" > <i class="fa fa-eye"></i>
</asp:LinkButton>
<asp:LinkButton ID="lnkGrdAppealsEdit" runat="server" ToolTip="Edit" CommandName="Edit" CommandArgument='<%# Eval("preliminaryenquiryid") + ";"+ Eval("fileid") + ";"+ Eval("filetrackingid")%>'>
<i class="fa fa-edit"></i>
</asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lnkGrdAppealsEdit" />
</Triggers>
</asp:UpdatePanel>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<NoRecordsTemplate>
There are no records..
</NoRecordsTemplate>
</MasterTableView>
</telerik:RadGrid>
aspx.cs page
protected void Page_Load(object sender, EventArgs e)
{
radGridRevisions.DataSource = string.Empty ;
radGridRevisions.DataBind();
radGridAppeals.DataSource = string.Empty;
radGridAppeals.DataBind();
radGridSpecialLeavePetitions.DataSource = string.Empty;
radGridSpecialLeavePetitions.DataBind();
radGridWrit.DataSource = string.Empty;
radGridWrit.DataBind();
radGridOtherPet.DataSource = string.Empty;
radGridOtherPet.DataBind();
}
reference:- https://stackoverflow.com/questions/354369/gridview-show-headers-on-empty-data-source
No comments:
Post a Comment