Dear Telerik,
I am having Radgrid , which has 10 columns in the names like A,B,C,D,E.. etc.
All columns widths are defined in percentage in order to make a better view.
My scenario is I would like to show only few columns in the grid and the remain columns need to be displayed based on the checkbox selection of HeaderContextMenu.
The HeaderContextMenu need to have all of the columns names in the list intimating checked flag for the visible column and uncheck for the invisible columns.
I hope you could understan the scenario.If so please let me know the possibility of the scenario
-Thanks
| <telerik:RadGrid ID="GridDepartment" runat="server" OnPageIndexChanged="GridDepartment_PageIndexChanged" |
| OnPageSizeChanged="GridDepartment_PageSizeChanged" OnSortCommand="GridDepartment_SortCommand" |
| OnItemDataBound="GridDepartment_ItemDataBound" OnItemCommand="GridDepartment_ItemCommand"> |
| <MasterTableView AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" |
| GroupsDefaultExpanded="false" PageSize="20"> |
| <Columns> |
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:CheckBox ID="checkBox" runat="server" AutoPostBack="true"/> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="DspName" HeaderText="姓名" UniqueName="DspName" |
| SortExpression="DspName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="DeptName" HeaderText="部门" UniqueName="DeptName" |
| SortExpression="DeptName"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <GroupByExpressions> |
| <telerik:GridGroupByExpression> |
| <SelectFields> |
| <telerik:GridGroupByField FieldName="DeptName" HeaderText="部门" /> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField FieldName="DeptName" HeaderText="部门" SortOrder="Descending" /> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> I don't know how to get the information when users click the CheckBox. For example,when users click the first two,how can I know the choosed items? Please have a look at the attachment. |
ItemCommand to reload my grid
<
asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<br />
<table align="center" class="style31">
<tr>
<td class="style32">
Area
</td>
<td class="style33">
<telerik:RadComboBox ID="cbxArea" Runat="server" AutoPostBack="True"
DataTextField="NombreArea" DataValueField="CodigoArea" Skin="Vista">
</telerik:RadComboBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style32">
Responsable
</td>
<td class="style33">
<telerik:RadComboBox ID="cbxResponsables" Runat="server" AutoPostBack="True"
DataTextField="NombrePersona" DataValueField="CodigoEnte" Skin="Vista"
Width="230px">
</telerik:RadComboBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style32">
Tipo de equipo
</td>
<td class="style33">
<telerik:RadComboBox ID="cbxTipoEquipo" Runat="server" AutoPostBack="True"
DataTextField="NombreTipo" DataValueField="CodigoTipoEquipo" Skin="Vista">
</telerik:RadComboBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style32">
</td>
<td class="style33">
</td>
<td>
<asp:Button ID="btnBuscar" runat="server" style="height: 26px" Text="Buscar" />
</td>
</tr>
</table>
<br />
<br />
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True"
AutoGenerateColumns="False" AutoGenerateEditColumn="True" GridLines="None"
Skin="Office2007" Visible="False" width="735px">
<mastertableview DataKeyNames="CodigoEquipo" editmode="EditForms"
enableheadercontextmenu="True" InsertItemDisplay="Bottom"
insertitempageindexaction="ShowItemOnFirstPage" ShowGroupFooter="True">
<Columns>
<telerik:GridBoundColumn DataField="CodigoEquipo" DataType="System.String"
HeaderText="CODIGO DE EQUIPO" UniqueName="CodigoEquipo">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CodigoTipoEquipo" DataType="System.String"
HeaderText="CODIGO TIPO EQUIPO" UniqueName="CodigoTipoEquipo">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CodigoPais" DataType="System.String"
HeaderText="PAIS" UniqueName="CodigoPais" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DescripcionEquipo" DataType="System.String"
HeaderText="DESCRIPCION" UniqueName="DescripcionEquipo">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NumeroTelefono" DataType="System.String"
HeaderText="NUMERO DE TELEFONO" UniqueName="NumeroTelefono">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MontoLimite" DataType="System.String"
HeaderText="MONTO LIMITE" UniqueName="MontoLimite">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FechaRegistro" DataType="System.String"
HeaderText="FECHA REGISTRO" UniqueName="FechaRegistro" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UsuarioRegistro" DataType="System.String"
HeaderText="USUARIO REGISTRO" UniqueName="UsuarioRegistro" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EstadoRegistro" DataType="System.String"
HeaderText="ESTADO REGISTRO" UniqueName="EstadoRegistro" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Origen" DataType="System.String"
HeaderText="ORIGEN" UniqueName="Origen" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EstadoActivoFijo" DataType="System.String"
HeaderText="ESTADO ACTIVO FIJO" UniqueName="EstadoActivoFijo">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="WebUserControl"
UserControlName="CtrlMantenimientoEquiposAsignados.ascx">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
<ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn"
Visible="False">
<HeaderStyle Width="19px" />
</ExpandCollapseColumn>
</mastertableview>
<ClientSettings ActiveRowIndex="true" EnablePostBackOnRowClick="false">
</ClientSettings>
</telerik:RadGrid>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
| <FilterMenu Skin="Telerik" EnableEmbeddedBaseStylesheet="true" EnableEmbeddedSkins="true"> |
| </FilterMenu> |
and have also tried applying the same settings in the code-behind, but the grid continues to emit the "RadMenu_WebBlue" class for the filter menu, causing it to appear with the "WebBlue" skin.
I have checked the value of the grid.FilterMenu.Skin property in the the grid PreRender event, and at that point it still has the value "Telerik". By the time it reaches the grid Unload event, the value has changed to "WebBlue". Apparently during the Render process it gets changed to "WebBlue".
I am using the RadControls for ASP.NET AJAX Q1 2010 DLL's.
Is there something I'm missing? Do I need to change another setting somewhere?
Regards,
Bob Reader