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

[Solved] DataListView Item Selection

6 Answers 154 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erturk
Top achievements
Rank 1
Erturk asked on 25 Dec 2009, 02:08 PM
Hi;

I set a Grid using DataListView section where I found Telerik Demos Page. In this section I must handle items, (can be catch item ID like this client side). How can I do this ? I added markup code below.

MarkUp Code :

                     <telerik:RadGrid ID="rgLessonContent" runat="server" 
                            GridLines="None" AllowPaging="true" OnPreRender="rgLessonContent_PreRender" 
                            PageSize="9" OnNeedDataSource="rgLessonContent_NeedDataSource"  
                            ShowHeader="False"
                            <ClientSettings> 
                                <Selecting AllowRowSelect="True" /> 
                                <ClientEvents OnRowSelected="RowSelected" /> 
                            </ClientSettings> 
                            <PagerStyle Mode="NextPrevAndNumeric" /> 
                            <MasterTableView TableLayout="Fixed" > 
                                <ItemTemplate> 
                                    <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %> 
                                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>' 
                                        runat="server" Width="400px" Height="150px"
                                        <table width="100%" style="border-style:none"
                                            <tr> 
                                                <td style="width: 100px"
                                                    <asp:Image runat="server" ID="imgSlide" Width="100px" Height="100px" ImageUrl='<%# Eval("LessonContentSlideImage")%>' /> 
                                                </td> 
                                                <td> 
                                                    <table width="100%" style="border-style:none"
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label2" runat="server" Text="Lesson Name : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("LessonName")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label4" runat="server" Text="Content Name : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Name")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label6" runat="server" Text="Passing Score : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("PassingScore")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label8" runat="server" Text="Maximum Score : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label9" runat="server" Text='<%# Eval("MaxScore")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:Label ID="Label10" runat="server" Text="Published : " CssClass="itemBlueBoldLabel" /> 
                                                            </td> 
                                                            <td> 
                                                                <asp:Label ID="Label11" runat="server" Text='<%# Eval("IsPublished")%>' CssClass="itemBlackLabel" /> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </asp:Panel> 
                                </ItemTemplate> 
                            </MasterTableView> 
                            <GroupingSettings CaseSensitive="false" /> 
                        </telerik:RadGrid> 

6 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Dec 2009, 06:21 PM
Hello Erturk,

I understood that you mean the ListView/DataList View demo, although I'm not sure that I understood your question properly. May I ask you to provide more information?

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Erturk
Top achievements
Rank 1
answered on 29 Dec 2009, 01:25 PM
Hello;

I used the sample Grid which you've given as a link. But in this section I can't get itemSelection event in client-side.I want to get only this. Client- side selected item.
0
Daniel
Telerik team
answered on 04 Jan 2010, 03:20 PM
Hello Erturk,

The ListView/DataList View demo uses global item template and is not suitable for such scenario. I recommend you examine our ListView control instead:
RadListView Predefined layouts
RadListView Selecting items

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Erturk
Top achievements
Rank 1
answered on 08 Jan 2010, 11:11 AM
I created a sample project wiht ListView which yo've given as link. I want a view which has two or more columns like CardView in Grid. How can I do this in ListView ?
0
Accepted
Daniel
Telerik team
answered on 13 Jan 2010, 12:06 PM
Hello Erturk,

You can define the desired layout of your RadListView as demonstrated on our online demos:
Basic sorting
Basic filtering

RadListView Getting started help topic

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Erturk
Top achievements
Rank 1
answered on 13 Jan 2010, 04:12 PM
Thanks ...
Tags
Grid
Asked by
Erturk
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Erturk
Top achievements
Rank 1
Share this question
or