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

Selecting "rows" in new datalist/repeater grid method

8 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zyguy
Top achievements
Rank 1
Zyguy asked on 27 Jan 2009, 06:45 PM
Finally glad to see a datalist-type solution for the Radgrid at http://demos.telerik.com/aspnet-ajax/Grid/Examples/Programming/ListView/DefaultCS.aspx.

I would like to retain the multi-row select method that is available in a standard radgrid - how can I implement a GridClientSelectColumn and Rowclicking in this new datalist format?

Thanks

8 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 30 Jan 2009, 11:18 AM
Hello Zyguy,

Unfortunately this is not possible when using DataList view for the grid since the entire layout is wrapped inside a single grid item template container. If you want to simulate selection on a per-row-basis, you will need to apply your custom code logic which to produce the desired effect.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 2
answered on 25 May 2009, 09:29 AM
I'm not sure if I have similar issue. I am using the datalist in http://demos.telerik.com/aspnet-ajax/Grid/Examples/Programming/ListView/DefaultCS.aspx.  I don't need to select a "row", but I have a check box in each one of my "boxes" (records) as displayed in the sample above. How can I loop through this and get the datakey for each record that was checked? Code is below.

On other note, for whatever reason, I can't get the paging to work with the code below as well.


<telerik:RadGrid ID="grdItems"  AutoGenerateColumns="true" ShowHeader="false"  BorderWidth="0" ShowStatusBar="false" CellPadding="0" CellSpacing="0" 
    runat="server" GridLines="None" AllowPaging="true"    
    PageSize="2">  
    <PagerStyle Mode="NextPrevAndNumeric" /> 
    <MasterTableView TableLayout="Fixed" DataKeyNames="mem_id">  
        <ItemTemplate> 
            <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %> 
            <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>' 
                runat="server">  
                <span style="vertical-align:top"><asp:CheckBox runat="server" ID="chkSelect" /></span>  
                <%#Eval("mem_name_first").ToString() + " " + Eval("mem_name_last").ToString()%> 
                <%#Eval("mem_id").ToString()%>                  
            </asp:Panel> 
        </ItemTemplate> 
    </MasterTableView> 
      
    <GroupingSettings CaseSensitive="false" /> 
</telerik:RadGrid> 
0
Sebastian
Telerik team
answered on 28 May 2009, 12:07 PM
Hello Scott,

For your convenience I prepared a simple demo which illustrates how to extract the data from each individual element inside the global item template of RadGrid (when used in DataList-like mode) on the client, pass it to the server and read it there. You will find the example attached to this forum thread.

The same approach can be used to determine the checked state of an asp CheckBox on the client and pass the information to the server (if needed).

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Scott
Top achievements
Rank 2
answered on 02 Jun 2009, 07:19 PM
I don't think this solves my issue.  I don't need to retrieve on row by row. 

Here's an example: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmailgrid/defaultcs.aspx 
If I want that example to be in a datalist view, click on a few records and click on Delete button, how do I retrieve the items that were checked on the server side?
0
Sebastian
Telerik team
answered on 03 Jun 2009, 11:26 AM
Hello Scott,

Unfortunately this type of functionality is not supported due to the reason explained in my first reply in this forum thread. I hope this is not a show stopper for you. You will need to use the grid in its regular row mode or using the global item template in this manner to delete records based on their checked status.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Scott
Top achievements
Rank 2
answered on 03 Jun 2009, 05:26 PM
Thanks.  I'm now using a regular datalist control to do solve my issue.  I wish Telerik has its own datalist control just like the Grid.  I know you guys have been talking about this for quite sometime but I hope to see it soon.

Thanks again for your help.
0
Zyguy
Top achievements
Rank 1
answered on 03 Jun 2009, 06:15 PM
I second that, we absolutely depend on the datalist-style arrangement, up till now we've have to use inferior non-Telerik controls for main product inventory pages.  It would be great if Radgrid could have a built-in datalist option. Trying to hack it with the method described in this thread works at the basic level but trying to get into the higher functionality it is very difficult to work with. 

0
Sebastian
Telerik team
answered on 04 Jun 2009, 10:18 AM
Hello guys,

I see your point here and will forward your proposal to our development department to be considered for the future versions of the suite. Currently we are researching the possibility to include DataList-like type of control to the suite using the binding engine of RadGrid for ASP.NET AJAX as a core. Stay tuned for more details.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Zyguy
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Scott
Top achievements
Rank 2
Zyguy
Top achievements
Rank 1
Share this question
or