Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
303 views
Hello:

I am trying to get a grid to show as a listview using your demo http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx.

The only way I can get anything to display on the screen is to comment out the lines showing in the following prerender statement.

        protected void rgdImg_PreRender(object sender, EventArgs e) 
        { 
            int itemCount = rgdImg.MasterTableView.GetItems(GridItemType.Item).Length + rgdImg.MasterTableView.GetItems(GridItemType.AlternatingItem).Length; 
            foreach (GridItem item in rgdImg.Items) 
            { 
                //if (item is GridDataItem && item.ItemIndex < itemCount
                //{ 
                //    ((item as GridDataItem)["ImageID"] as TableCell).Controls.Add(new LiteralControl("<table><tr><td>")); 
                //} 
            } 
        } 
 

The data that shows up is all over the place, not in a nice tabular form. Some will be in the grid, some appear to be outside etc.

If I uncomment the lines of code in the prerender I get nothing to display in the grid at all. It will iterate through the grid.items etc. as it should but nothing will display. I have verified that the data is in the datasource when bound.

My Radgrid code is below

                        <telerik:RadGrid ID="rgdImg" runat="server"  
                                         AllowPaging="true"  
                                         PageSize="4"  
                                         EnableHeaderContextMenu="false" 
                                         OnNeedDataSource="rgdImg_NeedDataSource"  
                                         ShowFooter="false"  
                                         AutoGenerateColumns="false" 
                                         OnItemCommand="rgdImg_ItemCommand"  
                                         OnItemDataBound="rgdImg_ItemDataBound" 
                                         OnPreRender="rgdImg_PreRender"
 
                            <MasterTableView TableLayout="Fixed"  
                                             EnableHeaderContextMenu="false"  
                                             DataMember="Image"
                                <Columns> 
                                    <telerik:GridBoundColumn UniqueName="ImageID" ReadOnly="true" Display="false" DataField="ImageID" /> 
                                    <telerik:GridTemplateColumn> 
                                    <ItemTemplate> 
                                            <%#  (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %> 
                                            <asp:Panel ID="pnlGrid" runat="server" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                                                <asp:Label ID="ImageID" runat="server" Visible="false" /> 
                                                <%# DataBinder.Eval(Container.DataItem, "ImageID") %> 
                                                <asp:CheckBox ID="ckImage" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="rgdImg_OnCheckedChanged" />&nbsp;&nbsp; 
                                                <asp:Image ID="image" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "RelPath") %>' /> 
                                                <br /> 
                                                <asp:Label ID="lblImageName" runat="server" Text="Image Name:   "></asp:Label> 
                                                <%# DataBinder.Eval(Container.DataItem, "Name") %> 
                                                <br /> 
                                                <asp:Label ID="lblArtType" runat="server" Text="Type:   "></asp:Label> 
                                                <%# DataBinder.Eval(Container.DataItem, "Type") %> 
                                                <br /> 
                                                <asp:Label ID="lblImageTag" runat="server" Text="Tags:  "></asp:Label> 
                                                <%# DataBinder.Eval(Container.DataItem, "Tag") %> 
                                                <br /> 
                                                <asp:Label ID="lblAltName" runat="server" Text="Alt. Name:  "></asp:Label> 
                                                <%# DataBinder.Eval(Container.DataItem, "AltName") %> 
                                                <br /> 
                                                <asp:Label ID="lblImageDescription" runat="server" Text="Description:   "></asp:Label> 
                                                <%# DataBinder.Eval(Container.DataItem, "Description") %> 
                                            </asp:Panel> 
<%--                                            <%# (((GridItem)Container).ItemIndex != (((GridItem)Container).OwnerTableView.PageSize - 1))? "<table style='display:none;'><tr><td>" : "" %> 
--%>                                        </ItemTemplate> 
                                    </telerik:GridTemplateColumn> 
                                </Columns> 
                                </MasterTableView> 
                            <ClientSettings> 
                                <Selecting AllowRowSelect="true" /> 
                            </ClientSettings> 
                        </telerik:RadGrid> 
 

Thanks for your time.
Chris
Top achievements
Rank 1
 answered on 11 Aug 2010
2 answers
225 views
Good Day Telerik Support and User Community, 

I have a requirement to export a large amount of data from a table in the which the Radgrid is successfully bound.  There are about 130k rows of data in the table in which the Radgrid is successfully displaying data through the usage of a linq datasource.  This Radgrid implementation was modelled after the performance demo entitled "300000 rows with LINQ" and combined with other demos to introduce smart filtering on the desired columns.  The result is an extremely fast UI presentation. 

Although,  when the user applies the desired filter & selects the export option, the system may sometimes croak depending on the total record count in the resulting dataset.  There are a few ways around this problem & I am hoping you can direct me in the implementation with Radgrid:

Option 1 (ideal):  When the export button is pressed, capture the export event and discover the radgrid's filter selections which are then used asynchronously to generate a report.  The creation/delivery of the report can be done via Telerik reporting or SSRS or some other technology that is better built to handle large loads of data.

Option 2: simply catch the export event and instruct the user to further filter the grid if too many rows are still being shown.

In either option,  I need to figure out 
1-- how to capture the export event
2-- how to determine the filter criteria that the user specified

Please assist me in determining how to perform these two operations, as I cannot find an example or documentation in either.

Thanks in advance...  
--Joe.

Joe
Top achievements
Rank 1
 answered on 11 Aug 2010
2 answers
145 views
Trying to add a bit of visual eye candy to my RadComboBox...

I am pre-populating a RadComboBox with values from a database. While doing this, I'm adding an item at the top called "Select an Analyst" which gets used if the value is null. I'm adding this item in italics...kind of how it looks when use EmptyMessage. What I would like to do though, is if someone selects an item in the RadComboBox that is not "Select an Analyst", the font changes back to normal.

I'm assuming I would have to do this with client side javascript, but I can't seem to figure out client side how to change the font property of the RadComboBox. I'm using the OnClientSelectedIndexChanged event. Can I change the font style based on the eventArgs client side?

Thanks for the help!
Philip Senechal
Top achievements
Rank 1
 answered on 11 Aug 2010
5 answers
134 views
Mostly out of curiosity, I am wondering if anyone actually uses the Autogenerated Columns feature? There are several reasons I never use it (mainly that I want more control over how it looks) but the biggest reason of them all is that the names the columns have in the database almost never are what you want the user to see. Considering that this option is almost at the top of the Smart-tag in Visual Studio, at least Telerik must think that a lot of people use this, so I cant help wondering, "is there a smart way of using autogenerated columns that I just dont know about??"
improwise
Top achievements
Rank 1
Iron
Iron
 answered on 11 Aug 2010
2 answers
94 views
I have some Rad Data Grids in a DataList that I am using to create a variable number of grids on the page.
All these grids are loaded on the client side using page methods that are called in pageLoad method.  This works for the most part, but in certain cases when there are a large number of grids on the page (more than 50 or 60) too much data is returned and the script stops running. 

In order to remedy this, I'm trying to use the OnGridCreated even to load the grid specific data one at a time, instead of loading up all the Grids at once.  Is there a property that I can use as sort of a bag of data accessible on the client side before the rows are bound, so I can store any arguments I need for the client side call?  ClientDataKeys looks promising, but the data might always be dynamic.

What's the recommended way to do this?
Christopher
Top achievements
Rank 1
 answered on 11 Aug 2010
1 answer
146 views
So I have a web app and I have a RadUpload inside of a RadAjaxPanel.  I think I figured out that I need to disable the panel's Ajax when I click on the button to actually upload the files (am I correct with that?).  I do not have the upload in a grid or anything like that.  I have RadMultiPage and I need to have about 6 or 7 different uploads.  Right now when i select any number of files, it says the count is 0.  How do I make it so it sees the file and i'm assuming does the post back? 
Cori
Top achievements
Rank 2
 answered on 11 Aug 2010
1 answer
136 views
Any ideas on how I could do the following?

I have a rad window, I use a button inside the content to close the window. When I click my close button - I pass an argument that lets me control what happens on the parent page.

When I click the control's close button (top right corner, specified as the close behavior) - I don't have the opportunity to pass something back in the arugment, and so my parent page does a postback (which is the default, but what I specifically want to avoid).

I want both close buttons to do the same thing ..

Anyone?

Kori
Cori
Top achievements
Rank 2
 answered on 11 Aug 2010
1 answer
98 views

Hello,
I'm using a RadUpload control.
I have a Panel control that includes RadUpload and it's Submit button (WebControls.Button).
Depends on some conditions I'm playing with visibility of the Panel.
When the panel is visible, I can choose file to upload, then when I press Submit button - UploadedFiles.Count shows 0 files.
I'm using
RadAjaxManager to make my page load different parts of my page smoothly and of cause, I use it for the Panel (described above).

It works fine if I take the Submit button out from the panel and make it always visible, but unfortunately that‘s not the case.

When I’m using RadAjaxManager to “load” the Submit button, it stops read data from RadUpload control.

Can you please help me out and let me know what is the work around this problem???

 

Thanks,

Kevin

Cori
Top achievements
Rank 2
 answered on 11 Aug 2010
1 answer
94 views
Please find attached file. I am thinking to use Red Scheduler for this. Could you guys please let me know is it possible.

Thanks
Peter
Telerik team
 answered on 11 Aug 2010
1 answer
97 views
hi

I am not able to get the full window right and i want my panelbar to be expanded when load. is there something that i missed? Thanks
 
<style type="text/css">  
         .style1
        {
            width: 100%;
        }
    html, body, form  
    {  
        height: 100%; 
         padding: 0px;  
        overflow: hidden;  
       
    }  
    </style>
</head>
<body style="margin:0">
    <form id="form1" runat="server">
  <div id="ParentDivElement" style="height: 100%;"
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                hello</td>
        </tr>
        <tr>
            <td>
                  <telerik:RadSplitter ID="RadSplitter1"  runat="server" Height="100%" 
                      Width="100%">
        <telerik:RadPane ID="navigationPane" runat="server" Height="100%" Width="150">
            <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" 
                ExpandMode="FullExpandedItem" Height="100%" 
                Skin="Office2007">
                <Items>
                    <telerik:RadPanelItem runat="server"  Text="Application">
                        <Items>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 4">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 5">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 6">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 7">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 8">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 9">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 10">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 11">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 12">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 13">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 14">
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelBar>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Forward" />
        <telerik:RadPane ID="contentPane" runat="server"  Scrolling="Y">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </telerik:RadPane>
    </telerik:RadSplitter>
  
            </td>
        </tr>
        <tr>
            <td>
                 </td>
        </tr>
    </table>
  </div>
    </form>
</body>
</html>
Svetlina Anati
Telerik team
 answered on 11 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?