Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
247 views

I have implemented a RadListBox that utilizes the reorder and delete functionality provided by AllowReorder and AllowDelete. It worked fine until I also began to use the ItemTemplate functionality to create list items as hyperlinks (thanks to some fantastic help from Genady in this forum).

 

When the listbox first appears, everything is fine. The list items are hyperlinks. If I click off to the side of one of the list items (so the hyperlink is not fired, but the item is selected), and then click either the Move Up or the Move Down button, the item is moved up or down as it should be but, an additional item, with the same name, is added to the list and it is NOT a hyperlink. So, after the Move up or Move down action I have two instances of the selected item in the list. One is a hyperlink and one is not.

 

As a work-around, I have been experimenting with using the client-side API to handle the reorder and delete functionalty, per the examples on this site. But, that will open up another can of worms, and I would rather avoid doing that.

Has anyone else experienced problems with AllowReorder when using an ItemTemplate to customize the display?

Thanks for any advice you can give.

UPDATE: I used the onClientReordered event to trap the event in an attempt to remove the "additional", non-hyperlink item that was
"added" to the list. When I did this, both items were removed from the list. So, I think that an item wasn't actually added when the Move UP or Move Down buttons are used but, the single item is displaying regular text along with the hyperlink after it is moved in the list. I thought this might be helpful information.

J
Top achievements
Rank 1
 answered on 15 Jul 2010
1 answer
110 views
As we develop with the new Telerik controls, we have noticed that the speed that they function is much faster in Chrome or Firefox.
IE takes twice as long to process.

We are curious as to the reason for this speed difference.
We develop with Microsoft products (Visual Studio and SQL Server) so are wondering why the performance with Microsoft's browser is significant less than competitors' browsers.

Thanks for any suggestions or insights you may have.
Dimo
Telerik team
 answered on 15 Jul 2010
2 answers
96 views
Hi,

I have a RadGrid with grouping = true, I can use it and drag a colum to group by, but the problem is that the text on the grouping is abit off. When I use DeveloperTool to check it I can see that the div that gets created is a bit over the div or rather they overlap.

There is no easy way to explane this, but it simply looks strange or bad basicly the Upper "edge" of the letters hit the top of the grid.

I've added a printscreen.

I have made no adjustments to the grid its straitforward and I've only enabled grouping, sorting and similar functions.
Is there any way to fix this?
Tye
Top achievements
Rank 1
 answered on 15 Jul 2010
4 answers
100 views
RadGrid using Webservice binding with clientside cache but not export data.(Xls,csv)


This is my code:

<telerik:RadGrid
 ID="RadGrid2" AllowSorting="true" AllowPaging="true"AllowFilteringByColumn="true"
            AutoGenerateColumns="false" runat="server">
            <MasterTableView CommandItemDisplay="Top">
                <CommandItemSettings ShowExportToCsvButton="True"
                    ShowExportToExcelButton="True" />
                <Columns>
                    <telerik:GridBoundColumn DataField="Id"HeaderText="Id" />
                    <telerik:GridBoundColumn DataField="Name"HeaderText="Name" />
                      
                </Columns>
  
<PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
            <PagerStyle AlwaysVisible="true" />
            <ClientSettings>
                <DataBinding Location="~/mywebservice.asmx" EnableCaching="true"
                    SelectMethod="GetFacilityListCH"  />
            </ClientSettings>
        </telerik:RadGrid>
nanthakumar thangavel
Top achievements
Rank 1
 answered on 15 Jul 2010
1 answer
114 views

Hi all,
I am trying to add columns to my grid programmatically. It works OK with 1 column, but more than 1 throw an error about multiple controls with the same ID. I'm using the below code:

 

// Add columns programmatically
  
  
  
GridBoundColumn boundColumn;
  
int ii = 0;
  
int ij = 0;
  
foreach (DataRow row in dt.Rows)
  
{
  
// We only want to generate columns off the first row
  
  
  
if (ii>0) continue;
  
// Create the new column collection in our loop
  
  
  
boundColumn = new GridBoundColumn();
  
foreach (DataColumn col in dt.Columns)
  
{
  
// Increment to pass the first columns
  
  
  
ij++;
  
// We don't want the first column because it's our identity (ID) column
  
  
  
if (ij == 1) continue;
  
boundColumn.DataField = col.ToString();
  
boundColumn.HeaderText = col.ToString();
  
// Add the column to our grid
  
  
  
gvLUs.MasterTableView.Columns.Add(boundColumn);
  
}
  
ii++;
  
}
  
// Bind the data to the grid
  
  
  
gvLUs.DataBind();

 

 



I've checjed and the text from col.ToString() is different. The error is balking about an ID from the second column being added. The error is as the page is rendered.

Any ideas?

Thanks!
Brad
Top achievements
Rank 1
 answered on 15 Jul 2010
1 answer
221 views
Hi,

I am using Gridclientselectcoiumn in my radgrid. I have a label in my commanditemtemplate.  When user checks checkbox i just want to show number of checkboxes selected in that label. Suppose If user selects 4 checkboxes i just want to show like Selected Records: 4.  Here is my code for that......

Grid client select column....
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"  HeaderStyle-Width="3%"  ItemStyle-Width="3%">
 <HeaderStyle Width="3%"></HeaderStyle>
 <ItemStyle Width="3%"></ItemStyle>
</telerik:GridClientSelectColumn>

commanditemtemplate

<CommandItemTemplate>
   <td align="right" style="width: 20%">
Selected Records:<asp:Label ID="lblselTsks" Width="20px" Font-Size="10pt" Font-Bold="true" runat="server" Text="0"></asp:Label>
   </td>
</CommandItemTemplate>


codebehind and JS

protected void rg200_DataBound(object sender, EventArgs e)
    {
        foreach (GridDataItem item in rg200.MasterTableView.Items)
        {
            CheckBox chkBoxOne = (CheckBox)item.FindControl("ClientSelectColumn");
            if (chkBoxOne != null)
                chkBoxOne.Attributes.Add("onclick", "javascript:return SelectOne('" + chkBoxOne.ClientID + "')");
        }
    }
 
 
JS
 
 
function SelectOne(id) {
                var count = 0;
                count = Number(document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML);
                if (document.getElementById(id).checked == true) {
                    if (!document.getElementById(id).disabled) {
                        count = count + 1;
                    }
                }
                else if (document.getElementById(id).checked == false) {
                    if (!document.getElementById(id).disabled) {
                        count = count - 1;
                    }
                }
                document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML = count;
            }


The problem is when i select checkbox  like 1 or more, the selected checkboxes count is not displaying. Its always showing Selected Records: 0.( See the image). Where am i doing wrong? How to resolve this issue. Any help should be appreciated.
Babu Puchakayala
Top achievements
Rank 1
 answered on 14 Jul 2010
3 answers
224 views
Hi,

I am using a RadSplitter with Orientation="Horizontal" FullScreenMode="True" LiveResize="True".
I have put 2 RadPane with 1 RadSplitBar, 1st pane locked.
In the 2nd RadPane, I have put another RadSplitter with Orientation="Vertical" FullScreenMode="True" LiveResize="True"
with 2 RadPane, 2nd pane has fixed width.

When collapsing last pane, the bottom pane of first RadSplitter shows a horizontal scrollbar.
It seams that the inner RadSplitter grows of 1px when collapsing.

Here is the code I am using :

    <form id="form1" runat="server"
        <ajaxToolkit:ToolkitScriptManager ID="sm" runat="server" /> 
        <telerik:RadSplitter ID="globalsplit" runat="server" Orientation="Horizontal" FullScreenMode="True" LiveResize="True"
            <telerik:RadPane ID="globaltoolbar" runat="server" Locked="true"
                <telerik:RadToolBar ID="toolbar" runat="server"
                    <Items> 
                        <telerik:RadToolBarButton Text="Item 1" /> 
                        <telerik:RadToolBarButton IsSeparator="true" /> 
                        <telerik:RadToolBarButton Text="Item 2" /> 
                    </Items> 
                </telerik:RadToolBar> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="split1" runat="server" CollapseMode="None" /> 
            <telerik:RadPane ID="mainpan" runat="server"
                <telerik:RadSplitter ID="mainSplit" runat="server" Orientation="Vertical"  
                    FullScreenMode="True" LiveResize="True"
                    <telerik:RadPane ID="contentPane" runat="server"
                        <p>Main place</p> 
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="mainSplitBar" runat="server" CollapseMode="Backward" /> 
                    <telerik:RadPane ID="schedulePan" runat="server" Width="260px" MinWidth="260" MaxWidth="260"
                            [Scheduler] 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
    </form> 
 
Daniel
Top achievements
Rank 1
 answered on 14 Jul 2010
3 answers
144 views
I have the following treeview that is loaded using LoadXML with the xml string below. The treeview has a server-side
OnNodeCheck event defined which calls "ShowCheckedNodes" (below). The problem i am having is that the event fires
but the reports.CheckNodes property does not return the checked node in the collection.

Thanks Marc

<telerik:RadTreeView ID="reports" Runat="server" BorderColor="Black"  MultipleSelect="false"  
            BorderStyle="Outset" BorderWidth="1px" Skin="Outlook" CheckBoxes="true" CheckChildNodes="false"
                     TriStateCheckBoxes="true" EnableViewState="true"
                    OnClientNodeChecked="ClientNodeClicking"
                     OnClientNodeChecking="onNodeClicked"
                    OnNodeCheck="ShowCheckedNodes"
                   style="z-index: 1; left: 15px; top: 100px; position: absolute; height: 319px; width: 245px"
                   Height="300px" SingleExpandPath="True" Width="275px"
                   ShowLineImages="False" PersistLoadOnDemandNodes="False"
                  EnableEmbeddedScripts="True" EnableAjaxSkinRendering="False">
</telerik:RadTreeView>


{<Tree>
<Node Text="Energy Reports" Value="-1">
<Node Text="Energy Monthly Summary" fm="html"  vc="uc_monthstart,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_Benchmark"/>
<Node Text="Comparative Data" fm="excel,htm,pdf"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_CompData"/>
<Node Text="Comparative Data Input Units" fm="excel"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_CompData_Entr"/>
<Node Text="Predicted vs Actual Consumption" fm="pdf"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_PrevsAct"/>
</Node>
<Node Text="Maintenance Reports" Value="-1">
<Node Text="Preventive Maintenance" fm="pdf,html,excel"  vc="uc_monthstart,uc_sites" multisite="no"  ums="no"  Value="RS_@acctid_Pmaint"/>
<Node Text="YTD Preventive Maintenance Compliance" fm="pdf"  vc="uc_monthstart,uc_sites" multisite="no"  ums="no"  Value="RS_@acctid_PmaintYTD"/>
<Node Text="Quarterly Fire and Life Safety" vc="uc_quarter,uc_sites" multisite="no"  ums="yes"  Value="RS_@acctid_FLS"/></Node><Node Text="Budget Reports" Value="-1">
<Node Text="Basic Budget" fm="pdf"  Value="RS_@acctid_Basic"/>
<Node Text="Regression Budget" Value="RS_@acctid_Regression"/>
</Node>
<Node Text="Corporate Reports" Value="-1"><Node Text="Corporate Status Report" vc="uc_number,uc_sites" Value="RS_@AcctID_Status"/>
</Node>
</Tree>}

protected void ShowCheckedNodes(object sender, System.EventArgs e)
    {
        string message = string.Empty;
        foreach (RadTreeNode node in reports.CheckedNodes)
        {
            message += node.FullPath + "<br/>";
        }
    }
Derek Hunziker
Top achievements
Rank 1
 answered on 14 Jul 2010
4 answers
258 views
Hello,

I'm getting the following error in one of my pages:

Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.

The page was working OK, but now all of a sudden, I'm getting this error.  I have this in a partial view:

<%= Html.RadControlCss<RadCalendar>() %>

<%= Html.RadControlScripts<RadCalendar>() %>

<%= Html.RadControlCss<RadDateInput>() %>

<%= Html.RadControlScripts<RadDateInput>() %>

<%= Html.RadControlCss<RadTimeView>() %>

<%= Html.RadControlScripts<RadTimeView>() %>

<%= Html.RadControlCss<RadTextBox>() %>

<%= Html.RadControlScripts<RadTextBox>() %>

<%= Html.RadControlCss<RadDatePicker>() %>

<%= Html.RadControlScripts<RadDatePicker>() %>

<%= Html.RadControlCss<RadTimePicker>() %>

<%= Html.RadControlScripts<RadTimePicker>() %>

<%= Html.RadControlScripts<RadDateTimePicker>() %>

<%= Html.RadControlCss<RadComboBox>() %>

<%= Html.RadControlScripts<RadComboBox>() %>


<%= Html.RenderRadDatePicker((rad) =>

{

rad.ID = "StartDate";

rad.SelectedDate = DateTime.Today;

 

}, "Forest") %>

<%= Html.RenderRadTimePicker((rad) =>

{

rad.ID = "StartTime";

rad.SelectedDate = DateTime.Now;

 

}, "Forest") %>

Is this the cause of anything?

Thanks.

Robert
Top achievements
Rank 1
 answered on 14 Jul 2010
2 answers
160 views
2010.1.706.35, VS2008 IE8

I have master/child table where the child table is bound by "Client" for performance reasons, so each page's client details are retrieved with the parent record.

I also have an Export button but I am only outputting the master table information.   However it's very slow (I have other exports not involving bind by Client and it's fast) so I believe the Grid is also trying to retrieve child table information during export.   There are only 1,500 rows at the parent table.  Tried exporting via CSV or Excel HTML.

1) Is there a way to prevent detail table binding in code behind when exporting?   (other than not declaratively using bind by "Client" at all)

2) When using Excel HTML export, I noticed the result has garbage information and I believe this is because one of the detail table field can store HTML comments.   What's the typical way to resolve exporting in HTML when the field value might have HTML tags?
Lenny_shp
Top achievements
Rank 2
 answered on 14 Jul 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?