This is a migrated thread and some comments may be shown as answers.

Grid item selection

5 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jols
Top achievements
Rank 2
Jols asked on 20 Oct 2010, 11:39 AM
hello guys

                i would like to ask question about grid item selections. here's the set up of the grid, i have a grid that contains clientselectcolumn which is a checkbox and i have also a button per row  which i called it view profile, once i click the button view profile the checkbox is automatically check..is there a way that checkbox will not be check while clicking the button view profile on a row on the grid? 

sample codes is highly appreciated.


many thanks

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Oct 2010, 12:16 PM
Hello Jols,

I guess you have set the CommandName for 'View profile' button as 'Select'. Thats why its selecting the CheckBox in GridClientSelectColumn. Since you are using the button for viewing profile, you can change the CommandName to any custom CommandName.

Hope this information helps,
Princy.
0
Jols
Top achievements
Rank 2
answered on 21 Oct 2010, 07:59 AM
hello Princy

                 i'm very sorry its not the clientselectcolumn i'm using a gridtemplatecolumn and here's my source code;

 

<telerik:GridTemplateColumn UniqueName="TemplateEditColumn" >

 

 

<ItemTemplate >

 

 

<asp:HyperLink ID="ViewLink" runat="server" Text="View Profile" ForeColor ="Blue" Font-Bold ="true" Font-Size ="Small" >

 

 

 

</asp:HyperLink>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>
                is their a way to prevent ticking those checkbox using this template? hoping for you response.

thanks
jols
               

 

0
Princy
Top achievements
Rank 2
answered on 21 Oct 2010, 11:04 AM
 Hello Jols,

I am not sure about the scenario/requirement that you are trying, because I got confused about your setup. At this point, pasting the complete code or briefly explaining the requirement would be helpful in further help.

Thanks,
Princy.
0
Jols
Top achievements
Rank 2
answered on 21 Oct 2010, 12:04 PM
hello princy

                  lets erase those post previously, i'll make one, ok here's the scenario in the grid i have a gridtemplatecolumn which has an itemtemplate inside which is hyperlink name view profile now my question is, is there a way that the check box will not tick when the user click the view profile hyperlink? .

<

 

telerik:RadGrid ID="grid1A" runat="server" Skin="Hay" AutoGenerateColumns="False" GridLines="None" Width="420px" OnItemCommand="grid1A_ItemCommand" style="font-weight: bold; text-transform: uppercase; font-family: Arial;" AllowMultiRowSelection="True" OnItemDataBound="grid1A_ItemDataBound" Font-Size="Large" OnItemCreated="grid1A_ItemCreated" PageSize="20">

 

 

<MasterTableView DataKeyNames ="fcEmployeeNo">

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns >

 

 

<telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn" > // THIS IS THE CHECKBOX ON THE GRID

 

 

<HeaderStyle Width ="20px" />

 

 

<ItemStyle Width ="20px" />

 

 

</telerik:GridClientSelectColumn>

 

 

 

<telerik:GridBoundColumn DataField ="FULLNAME" UniqueName ="FULLNAME" HeaderText ="Candidates" SortExpression ="FULLNAME">

 

 

<HeaderStyle Font-Size ="Large" />

 

 

<ItemStyle Font-Size ="Large" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateEditColumn" > // THIS IS WHERE THE USER CLICK FOR VIEW PROFILE.

 

 

<ItemTemplate >

 

 

<asp:HyperLink ID="ViewLink" runat="server" Text="View Profile" ForeColor ="Blue" Font-Bold ="true" Font-Size ="Small" > /

 

 

 

</asp:HyperLink>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridBoundColumn Visible ="False" DataField ="fcEmployeeNo" UniqueName ="fcEmployeeNo" HeaderText ="fcEmployeeNo">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn Visible ="False" DataField ="CandidateID" UniqueName ="CandidateID" HeaderText ="CandidateID">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn Visible ="False" DataField ="fcNominatedfor" UniqueName ="fcNominatedfor" HeaderText ="fcNominatedfor">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn Visible ="False" DataField ="fxballotlocation" UniqueName ="fxballotlocation" HeaderText ="fxballotlocation">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn Visible ="False" DataField ="fxAllowedVoters" UniqueName ="fxAllowedVoters" HeaderText="fxAllowedVoters">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<FilterMenu EnableTheming="True" Skin="Hay">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

that's the complete codes in my grid.

thanks
jols

 

0
Princy
Top achievements
Rank 2
answered on 21 Oct 2010, 01:39 PM
Hello Jols,


I cannot replicate the issue that you explained even I tried the same code as yours. When clicking the HyperLink, it is not cheking the checkbox in the row, for me. I suspect that you are having some client side method attached to HyperLink which selects the row. 

Can someone from Telerik give us a hand in this?


Thanks,
Princy.
Tags
Grid
Asked by
Jols
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Jols
Top achievements
Rank 2
Share this question
or