Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 views
Hey at Telerik

I have adjusted a grid to open a radwindow everytime an insert or edit command is executed. the grid needs to be either in insert mode or edit mode.
I have found a bug in GridNumericColumn when setting focus to the control server side. I set focus to the fist control in the insertitem in the itemdatabound event so entering text can be done without the need of a mouse. If i try to insert the item the radwindow shows like it should, when i close it and try either by doubleclick or the edit button to edit an item i get a javascript error.
It works with a gridboundcolumn instead of the gridnumericcolumn!, but i need a numeric column. :)

Im using latest Q1 2009 build.

I have included an example which illustrates the problem. It can be found here. http://80.166.206.186/Screendump/

 

I hope there is a way to fix this easily.

Morten

Morten Bomholt
Top achievements
Rank 1
 answered on 23 Apr 2009
2 answers
332 views
I would like to have a column in my grid that shows a checkbox.  Some checked and some not.  When the user clicks on that checkbox I need to be able to call a client side function.  I am having some difficulty.  I have tried the following scenarios, with the following issues:

1.  GridCheckBoxColumn - is a read only column.  Can not cause the checkbox clicked event.

2.  GridTemplateColumn with a checkbox within - can not trigger the client side function call.

3.  GridButtonColumn as an image button. - The image in the first row is not loading properly.

The third option has been the most successful so far.

Here is the grid definition:

<telerik:RadGrid ID="grdUserMonitoredPS" runat="server"
AllowSorting="True"
AllowPaging="True"
AllowMultiRowSelection="True"
PageSize="15"
EnableViewState="False"
AutoGenerateColumns="False"
EnableLinqExpressions="False"
OnNeedDataSource="grdUserMonitoredPS_NeedDataSource"
GridLines="None"
OnItemDataBound="grdUserMonitoredPS_ItemDataBound">
<ClientSettings>
<ClientEvents OnCommand="grdUserMonitoredPS_OnCommand"
OnRowContextMenu="grdUserMonitoredPS_OnRowContextMenu"
OnRowMouseOver="grdUserMonitoredPS_OnRowMouseOver"/>
<Selecting AllowRowSelect="true"/>
<Scrolling AllowScroll="true" ScrollHeight="490" />
</ClientSettings>
<HeaderContextMenu>
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<MasterTableView ClientDataKeyNames="CorporateCode, PrintSiteCode">
<Columns>
<telerik:GridButtonColumn
ButtonType="LinkButton"
HeaderText="Corporate"
DataTextField="CName"
UniqueName="ViewCorporate"
CommandName="ViewCorporate"/>
<telerik:GridButtonColumn
ButtonType="LinkButton"
HeaderText="Print Site"
DataTextField="PSName"
UniqueName="ViewPS"
CommandName="ViewPS"/>
<telerik:GridCheckBoxColumn
DataField="Monitored"
UniqueName="Monitored"
HeaderText="Monitored"/>
<telerik:GridClientSelectColumn
UniqueName="Selected"/>
<telerik:GridTemplateColumn
DataField="Monitored"
HeaderText="Monitored Template"
UniqueName="MonitoredTemplate">
<ItemTemplate>
<asp:CheckBox ID="chkMonitored" runat="server" onclick="alert('');"/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn
HeaderText="Monitored Button"
DataTextField="Monitored"
CommandName="ChangeChecked"
ButtonType="ImageButton"
UniqueName="MonitoredButton">
</telerik:GridButtonColumn>
</Columns>
<PagerStyle Mode="NextPrevAndNumeric" />
</MasterTableView>

The column is the very last one.  On item data bound I try to populate the image as follows:

if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
UserMonitoredPSGrid currentRow = (UserMonitoredPSGrid)e.Item.DataItem;
//find the checkbox control
GridButtonColumn ibMonitored = (GridButtonColumn)grdUserMonitoredPS.Columns.FindByUniqueName("MonitoredButton");
//Check the checkbox
ibMonitored.ImageUrl = currentRow.Monitored ? "~/App_Images/Accept.png" : "~/App_Images/Ignore.png";
}

The first row has no image.  In fact when I look at it in break mode the src tag reads:  src=''.  Every row thereafter shows the image properly.  What have I done wrong or perhaps you have another suggestion.

Regards,
Cynthia
Cynthia
Top achievements
Rank 1
 answered on 23 Apr 2009
1 answer
133 views
I'm using your example and it works now very good, but I need to get a reference to the usercontrol in the template. How should I do?
                <AdvancedEditTemplate> 
                <scheduler:AdvancedEditForm runat="server" ID="AdvancedEditForm1" Subject='<%# Bind("Subject") %>' 
                    Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                        
                    /> 
                      
            </AdvancedEditTemplate> 
I need to get the reference to "AdvancedEditForm1" from "RadScheduler1". I try this with no result
Dim myForm As AdvancedEditForm = Me.RadScheduler1.TemplateControl.FindControl("AdvancedEditForm1"

I need also set a property in AdvancedEditForm with the name VisibleForFamily (Boolean).
I have in AdvancedForm.aspx a checkbox and I will set it to true or false and reverse, I will get what the user have clicked in the box.

This property is not included in appointment IDatasource so I need to set it in any other way.

/Thanks
Peter
Telerik team
 answered on 23 Apr 2009
3 answers
82 views
Hi, I have 1 menu item that contains 3 tree view controls that I populate. I am using the itemtemplate for this. My problem is that some of the graphics for the skin are misplaced and are appearing in wrong spots in the menu and I would like to know how to stop this from happening. A sample screenshot can be found here: http://www.flickr.com/photos/ddgaylor/3450584428/

The grid is defined here:
<telerik:RadMenu ID="rmMain" runat="server" CollapseDelay="0" Width="98px" Skin="Telerik" >
    <CollapseAnimation Type="InBounce" Duration="0"></CollapseAnimation>
    <Items>
 <telerik:RadMenuItem Text="Actions&nbsp;<img src='images/ddarrow.gif' border='0' />">
     <Items>
  <telerik:RadMenuItem >
      <ItemTemplate>
   <div>
       <table cellpadding="10">
    <tr>
        <td valign="top">
     <asp:TreeView ID="tvTree" runat="server" ShowExpandCollapse="False" EnableClientScript="False"
         PopulateNodesFromClient="False">
     </asp:TreeView>
        </td>
        <td valign="top">
     <asp:TreeView ID="tvTree2" runat="server" ShowExpandCollapse="False" EnableClientScript="False"
         PopulateNodesFromClient="False">
     </asp:TreeView>
        </td>
        <td valign="top">
     <asp:TreeView ID="tvTree3" runat="server" ShowExpandCollapse="False" EnableClientScript="False"
         PopulateNodesFromClient="False">
     </asp:TreeView>
        </td>
    </tr>
       </table>
   </div>
      </ItemTemplate>
  </telerik:RadMenuItem>
     </Items>
 </telerik:RadMenuItem>
    </Items>
    <ExpandAnimation Type="None" Duration="0"></ExpandAnimation>
</telerik:RadMenu>

Thanks.
Kamen Bundev
Telerik team
 answered on 23 Apr 2009
1 answer
153 views

We have an Asp.Net 3.5 application that is set up using a master page with user controls being added to it as the content. Page requests come from an Asp.net 1.1 application that renders the reponse into an iframe within the 1.1 application. Essentially a 1.1 app displaying 3.5 pages within it. One of these pages has a series of  RadComboBoxs in it.  One combo box has about 370 items in it when fully populated – we retrieve the items on demand using GetRequestedItems.

 

Ascx page

<telerik:RadComboBox ID="cmbProductFamily" runat="server" AutoPostBack="True"

                    CollapseAnimation-Duration="1" CollapseDelay="0"

                    EnableLoadOnDemand="True" ExpandDelay="0"

                    ItemRequestTimeout="1000" MaxHeight="400px"

                    onitemsrequested="cmbProductFamily_ItemsRequested"

                    OnSelectedIndexChanged="cmbProductFamily_SelectedIndexChanged"

                    ShowMoreResultsBox="True" Skin="Outlook"

                     Visible="False" Width="250px">

                    <ExpandAnimation Duration="0" />

                    <CollapseAnimation Duration="0" />

                </telerik:RadComboBox>

 

 

Code behind

protected void cmbProductFamily_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

        {

            try

            {

                cmbProductFamily.Items.Clear();

                tbl_ProductVersion[] Prods = GetProductFamilyByEnteredText(e.Text);

                int itemsPerRequest = 50;

                int itemOffset = e.NumberOfItems;

                int endOffset = itemOffset + itemsPerRequest;

                if (endOffset > Prods.Length)

                {

                    endOffset = Prods.Length;

                }

                for (int i = itemOffset; i < endOffset; i++)

                {

                    RadComboBoxItem item = new RadComboBoxItem(Prods[i].UpgradeFamily, Prods[i].lopfamid.ToString());

                    item.ToolTip = Prods[i].UpgradeFamily;

                    cmbProductFamily.Items.Add(item);

                }

                if (Prods.Length > 0)

                {

e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), Prods.Length.ToString());

                }

                else

                {

                    e.Message = "No matches";

                }

            }

            catch

            {

                e.Message = "No matches";

            }

        }

 

We can run the app on its own (a 3.5 app) and the radcombobox behaves nicely. However, when the page is rendered through the iframe in the asp.net 1.1 app it flickers badly when there is more that about 30 items in the list – you can see the hour glass flickering. At this point it will be slow to respond to selections , scrolling or adding more items using the ShowMoreResultsBox click. But like I say this does not happen when running stand alone in the 3.5 application context – everything works nicely there. I have tried various other settings like enableItemCaching, ShowWhileLoading = false. I have also databound the radcombo to the results set from the query (static items as opposed to load on demand) and still it behaves poorly in the 1.1 iframe context. I also tried just using a standard updatepanel around the control but to no avail.

 

Any ideas on what may be hindering the performance would be appreciated.

 

I am using version RadControls_for_ASP.NET_AJAX_2009_1_311_trial.exe.

Veselin Vasilev
Telerik team
 answered on 23 Apr 2009
3 answers
99 views
I can't get IsSeparator working in the 2009 versions of TabStrip. Is this a known bug or am I overlooking something? Can anyone help? Thanks!

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">  
    <Tabs> 
        <telerik:RadTab Text="test" NavigateUrl="test.html">  
        </telerik:RadTab> 
        <telerik:RadTab Text="test" NavigateUrl="test.html">  
        </telerik:RadTab> 
        <telerik:RadTab Text="test" NavigateUrl="test.html">  
        </telerik:RadTab> 
        <telerik:RadTab IsSeparator="true" Width="200px">  
        </telerik:RadTab> 
        <telerik:RadTab Text="test" NavigateUrl="test.html">  
        </telerik:RadTab> 
        <telerik:RadTab Text="test" NavigateUrl="test.html">  
        </telerik:RadTab> 
    </Tabs> 
</telerik:RadTabStrip> 
Paul
Telerik team
 answered on 23 Apr 2009
1 answer
108 views
Can someone show me how to modify this
http://www.telerik.com/help/aspnet-ajax/grdsavingsettingsonperuserbasis.html
to persist paging settings? 
It is great and save a lot of coding but I need that extra tidbit :)

Princy
Top achievements
Rank 2
 answered on 23 Apr 2009
1 answer
226 views
Hi

Can you please inform me how can I remove soem items from FormatBlock. I'm using RadEditor 5.3.2. I want to remove Directory list
Menu list, Formatted, Address items from dropdown. I'm using these editor in MOSS. I want to achieve this throung ToolsFile.xml
Stanimir
Telerik team
 answered on 23 Apr 2009
1 answer
79 views
Hi,

When trying to group by more than one column, the totals displayed for each grouping is incorrect. Is there any solution for this?
This is the same problem as Chris started long back 

It seems it has not been fixed in the version 2008.2.1001.20. Any idea?


Thanks a lot.
Milan G
Pavlina
Telerik team
 answered on 23 Apr 2009
1 answer
146 views
I want to programmatically create a RadHtmlField in a user control code behind but the SharePoint FieldName is not available as a property.  Is it even possible to create it dynamtically?  I noticed that the Sharepoint HtmlField does have a fieldName property and I would imagine the RadHtmlField would have it as well.

Thanks.


Stanimir
Telerik team
 answered on 23 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?