Hello,
I have a RadGrid data bound using an EntityDataSource.
Functionality I am attempting to accomplish: The user should only be able to select a row if a column in that row contains a specific value.
The column unique name which contains the value is PrpAnswerType.
When this rows' databound value is 6 for 'PrpAnswerType', that row should be selectable. Otherwise, there should be no select button.
I can't figure out how to hide/show the SELECT LinkButton based on another columns value for each row.
Here is my grid
Thank you
Kevin
I have a RadGrid data bound using an EntityDataSource.
Functionality I am attempting to accomplish: The user should only be able to select a row if a column in that row contains a specific value.
The column unique name which contains the value is PrpAnswerType.
When this rows' databound value is 6 for 'PrpAnswerType', that row should be selectable. Otherwise, there should be no select button.
I can't figure out how to hide/show the SELECT LinkButton based on another columns value for each row.
Here is my grid
<telerik:RadGrid ID="grdProperties" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" AutoGenerateHierarchy="True" CellSpacing="0" DataSourceID="edsProps" GridLines="None" SkinID="FewColumnsFewRecords"> <ClientSettings> <Selecting CellSelectionMode="None"></Selecting> </ClientSettings> <MasterTableView AutoGenerateColumns="False" DataKeyNames="PrpID" DataSourceID="edsProps"> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="PrpID" DataType="System.Int32" FilterControlAltText="Filter PrpID column" HeaderText="PrpID" ReadOnly="True" SortExpression="PrpID" UniqueName="PrpID" Visible="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PrpName" FilterControlAltText="Filter PrpName column" HeaderText="Prop. Name" SortExpression="PrpName" UniqueName="PrpName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PrpQuestion" FilterControlAltText="Filter PrpQuestion column" HeaderText="Question Text" SortExpression="PrpQuestion" UniqueName="PrpQuestion"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn DataField="PrpAnswerType" FilterControlAltText="Filter PrpAnswerType column" HeaderText="Answer Type" SortExpression="PrpAnswerType" UniqueName="PrpAnswerType"> <EditItemTemplate> <telerik:RadComboBox ID="RadComboBox1" runat="server" SelectedValue='<%# Bind("PrpAnswerType") %>'> <Items> <telerik:RadComboBoxItem runat="server" Text="Integer" Value="1" /> <telerik:RadComboBoxItem runat="server" Text="Decimal" Value="2" /> <telerik:RadComboBoxItem runat="server" Text="Currency" Value="3" /> <telerik:RadComboBoxItem runat="server" Text="Boolean" Value="4" /> <telerik:RadComboBoxItem runat="server" Text="Text" Value="5" /> <telerik:RadComboBoxItem runat="server" Text="Custom Options" Value="6" /> </Items> </telerik:RadComboBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="PrpAnswerTypeLabel" runat="server" OnDataBinding="PrpAnswerTypeLabel_DataBinding" Text='<%# Eval("PrpAnswerType") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridButtonColumn CommandName="Select" FilterControlAltText="Filter AddColumnOption column" Text="Add Column Option" UniqueName="AddColumnOption"> </telerik:GridButtonColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"> </EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu EnableImageSprites="False"> </FilterMenu></telerik:RadGrid><asp:EntityDataSource ID="edsProps" runat="server" ConnectionString="name=kdEntities" DefaultContainerName="kdEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="Properties"></asp:EntityDataSource>Thank you
Kevin