Folks, Using RadControls for ASP.NET AJAX Q2 2012 SP1 with VS 2010.
My Radgrid has approximately 65000 rows; uses LinqDataSource. also I have a external Panel (Panelotherinfo) to Navigate to other forms.
I would like to make that Panel:
- Invisible if after Filtering RadGrid has no rows.
- Visible if after Filtering Radgrid has rows.
Below is my Radgrid and panel declaration as well as RadGrid1_ItemEvent.
Thanks for any help
gc_0620
_______________
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
Width
=
"99.9%"
Font-Size
=
"11px"
AllowPaging
=
"True"
AllowSorting
=
"True"
CellSpacing
=
"0"
GridLines
=
"None"
Skin
=
"Office2007"
PagerStyle-Mode
=
"NextPrevNumericAndAdvanced"
OnPreRender
=
"RadGrid1_PreRender"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
DataSourceID
=
"LinqDataSourceClient"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
OnItemCommand
=
"RadGrid1_ItemCommand"
onitemcreated
=
"RadGrid1_ItemCreated"
onitemevent
=
"RadGrid1_ItemEvent"
>
''''
''''
</
telerik:RadGrid
>
<
asp:Panel
ID
=
"Panelotherinfo"
runat
=
"server"
>
<
h3
style
=
"background-color: #9fba2d; color: White; width: 20%; margin-left: 5px"
>
Client other information</
h3
>
<
br
/>
<
telerik:RadSiteMap
ID
=
"RadSiteMap1"
runat
=
"server"
Skin
=
"Sitefinity"
Width
=
"50%"
>
<
Nodes
>
<
telerik:RadSiteMapNode
runat
=
"server"
Text
=
"Contact/Race/PrimarryLanguage and Ethnicity/Anchestry"
NavigateUrl
=
"~/Default.aspx"
>
</
telerik:RadSiteMapNode
>
<
telerik:RadSiteMapNode
runat
=
"server"
Text
=
"Demographic/HouseholdComposition/Monthly Income"
NavigateUrl
=
"~/NotReadyyet.aspx"
>
</
telerik:RadSiteMapNode
>
<
telerik:RadSiteMapNode
runat
=
"server"
Text
=
"Encounter"
>
</
telerik:RadSiteMapNode
>
</
Nodes
>
<
LevelSettings
>
<
telerik:SiteMapLevelSetting
Layout
=
"Flow"
>
<
ListLayout
AlignRows
=
"True"
RepeatColumns
=
"3"
/>
</
telerik:SiteMapLevelSetting
>
</
LevelSettings
>
</
telerik:RadSiteMap
>
</
asp:Panel
>
protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
int rowcount = 0;
if (e.EventInfo is GridInitializePagerItem)
{
rowcount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
}
if (rowcount == 0)
Panelotherinfo.Visible = false;
else
Panelotherinfo.Visible = true;