Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
160 views

I have two treeviews on a page within RadAjaxPanels (tried this with basic divs to the same result) and have found something a little odd that I could do with a fix for. If I drag an object from the right tree as soon as I enter the left panel I get an error on line 1911, char 1, Error '_145' is null or not an object. After doing some more research I discovered that this only happens when I drag something out of the left edge of RadAjaxPanel2 and into the right edge of RadAjaxPanel1.

e.g. if I drag out of the bottom of RadAjaxPanel2 and onto RadAjaxPanel1 from the right it's fine, if I drag out of the left of RadAjaxPanel2 and into the top edge of RadAjaxPanel1 again it's fine, but if I drag from the left edge of RadAjaxPanel2 onto the right edge of RadAjaxPanel1 I get the error (needs IE to be setup to show all Javascript errors for the error to be obvious).

As a temporary fix I can swap the trees round so that I am dragging from the left tree to the right tree, but this isn't an idea solution, has anyone encountered this before or got any ideas how I can solve this?

Cheers 

Jon 

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
        <contentTemplate> 
 
//CODE REMOVED TO KEEP SIZE DOWN  
 
    
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" BackColor="Aqua" CssClass="floatLeft">  
                <telerik:RadTreeView ID="RadTreeGroups"  AllowNodeEditing="true" EnableDragAndDrop="true" EnableDragAndDropBetweenNodes="true" OnNodeDrop="RadTreeGroups_NodeDrop" OnNodeEdit="RadTreeGroups_NodeEdit" OnClientContextMenuItemClicked="onClientContextMenuItemClicked" OnContextMenuItemClick="RadTreeGroups_ContextMenuItemClick" runat="server">  
                </telerik:RadTreeView> 
            </telerik:RadAjaxPanel> 
            <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" BackColor="Gray" CssClass="floatRight">  
                <telerik:RadTreeView ID="RadTreeResources"  runat="server" EnableDragAndDrop="true" OnNodeDrop="RadTreeLessons_NodeDrop">  
                </telerik:RadTreeView> 
            </telerik:RadAjaxPanel> 
        </contentTemplate> 
    </asp:UpdatePanel>

.floatRight  
{  
    float:right;  
    width:48%;  
}  
.floatLeft  
{  
    float:left;  
    width:48%;  
} 
Yana
Telerik team
 answered on 12 Mar 2009
1 answer
182 views
Hi,
Is there a method on client side to refresh a RadCalendar, which re-renders days but does not call onCalendarViewChanged?
Daniel
Telerik team
 answered on 12 Mar 2009
3 answers
142 views

Hallo,

I am having trouble retrieving the updated time value that users enter into my dateinput control of my raddatetimepicker that is within an EditItemTemplate in my Radgrid. On server side the values are persisting, meaning that they  are the same values that loaded when the grid loaded originally, I have also tried swithing off EnableViewState and I have also tried an Editmanager.

Could you please provide met with further ideas about what to do next? Below is aspx snippet and c# snippet. Thank you.

<ItemTemplate>  
<telerik:RadDateTimePicker ID="rdtpStartingTimeData" Enabled="false" runat="server" Calendar-DatePopupButton-Visible="false" DatePopupButton-Visible="false"                                                     SelectedDate='<%# DataBinder.Eval(Container, "DataItem.TimeStart") %>' DateInput-DateFormat="hh:mm" Culture="English (South Africa)" TimeView-TimeFormat="HH:mm" TimeView-Columns="4">  
</telerik:RadDateTimePicker>  
</ItemTemplate>  
<EditItemTemplate>  
<telerik:RadDateTimePicker ID="rdtpStartingTime" runat="server" Calendar-DatePopupButton-Visible="false" DatePopupButton-Visible="false" EnableViewState="false" DateInput-Visible="true" SelectedDate='<%# DataBinder.Eval(Container,"DataItem.TimeStart") %>' DateInput-DateFormat="hh:mm" Culture="English (South Africa)" TimeView-TimeFormat="HH:mm" TimeView-Columns="4">  
</EditItemTemplate>  
</telerik:GridTemplateColumn> 

 if (e.CommandName == Telerik.Web.UI.RadGrid.UpdateCommandName)  
            {  
                Telerik.Web.UI.GridEditableItem editedItem = e.Item as Telerik.Web.UI.GridEditableItem;  
 
                Telerik.Web.UI.RadDateTimePicker rdtpStartTime = (Telerik.Web.UI.RadDateTimePicker)editedItem.FindControl("rdtpStartingTime");  
                Telerik.Web.UI.RadDateTimePicker rdtpEndTime = (Telerik.Web.UI.RadDateTimePicker)editedItem.FindControl("rdtpEndingTime");  
            }  
 

Princy
Top achievements
Rank 2
 answered on 12 Mar 2009
1 answer
41 views
I have a Rad tool bar that has 3 drop downs. I want each drop down to have a different data source. When i try to establish the data sourse I can only create a data sourse for the tool bar but not for the drop downs. Is there a way to have the drop downs have their own data sourse?
Atanas Korchev
Telerik team
 answered on 12 Mar 2009
1 answer
70 views
Requirement: create 30 min time slots from 8 - 5 and allow users to create upto 5 appointments for each slot.
Question: Can we accomplish this using Telerik Scheduler control?
Kamen Bundev
Telerik team
 answered on 12 Mar 2009
6 answers
251 views
Hello,

I have a RadComboBox that uses the ItemTemplate property to represent bound items in a table.  For whatever reason, in the HTML, it renders a surrounding <div> with style="display:block"; I actually need style="display:inline".  Is there a way to change this?

Thanks.
Simon
Telerik team
 answered on 12 Mar 2009
4 answers
182 views
Hi,
I have problem with data manipulation in "detail grid".
I have typed DataSet that is binded to MasterDataGrid....that master data grid has 5 columns that are related with 5 fields from one table (MasterTable) but, when i click on Edit in some row, then within <EditFormSettings EditFormType="Template"> i have offered to modify other columns from MasterTable...all key values for masterGrid i suggest within masterGrid_ItemCommand (if e.CommandName == RadGrid.InitInsertCommandName)...
then i have added detailGrid inside that EditFromSettings...
now the problem appear...when i try to use that detailGrid, i can't find it as control in masterGrid, so i can't add row in that grid...even if I add row (with button that has CommandName="PerformInsert"), that command line simply dissapear in grid...like i didn't add it at all...
If i explained it little bit confusy here is some code that will help me to be more precise:
<telerik:RadGrid id="masterGrid" runat="server" AllowMultiRowSelection="false" AutoGenerateEditColumn="true" AutoGenerateColumns="False" DataMember="MasterTable" DataSourceID="someDataSource" GridLines="None" OnItemCommand="masterGrid_ItemCommand"> 
  <IxMasterTableView DataKeyNames="Col1,Col2,Col3" DataMember="MasterTable" DataSourceID="someDataSource" SelectionItemDisplay="TopAndBottom" AllowSorting="True" AutoGenerateColumns="False" CommandItemDisplay="Top"> 
    <CommandItemTemplate> some button is here </CommandItemTemplate> 
    <Columns> 
      <telerik:GridBoundColumn DataField="Column1" HeaderText="Column1 name" ReadOnly="True" SortExpression="Column1" UniqueName="Column1" /> 
      and 4 columns more... 
    </Columns> 
    <EditFormSettings EditFormType="Template"> 
      <FormTemplate> 
        <table> 
          <tr><td>...some TextBox binded columns....</td><tr> 
          <tr> 
            <td> 
              <telerik:RadGrid ID="detailGrid" runat="server" SelectionEnabled="False" DataSourceID="someDataSource" GridLines="None" DataMember="DetailTable" AutoGenerateColumns="False" AllowSorting="True" OnItemCommand="detailGrid_ItemCommand"> 
                <IxMasterTableView DataKeyNames="Col1,Col2,Col3,Col4,Col5" DataMember="DetailTable" DataSourceID="someDataSource" SelectionItemDisplay="TopAndBottom" AllowSorting="True" AutoGenerateColumns="False" CommandItemDisplay="Top"> 
                  <CommandItemTemplate> some button is here </CommandItemTemplate> 
                  <Columns> 
                    <telerik:GridTemplateColumn HeaderText="first" UniqueName="Col1" DataField="Col1" SortExpression="Col1"> 
                      <ItemTemplate> 
                          ...some link button... 
                      </ItemTemplate> 
                      <EditItemTemplate> 
                        ...some TextBox control... 
                      </EditItemTemplate> 
                    <telerik:GridTemplateColumn> 
                      ...and couple more GridTemplateControls... 
                      ...and last column in grid is something like this... 
                    <telerik:GridTemplateColumn UniqueName="ColumnDelete"> 
                      <ItemTemplate> 
                         <asp:Button ID="deleteButton" runat="server" Text="Del" CommandName="Delete" /> 
                      </ItemTemplate> 
                      <EditItemTemplate> 
                        <asp:Button ID="addButton" Text="Add" Visible='<%# don't know how to implement as it is in masterGrid %>' runat="server" CommandName="PerformInsert" />&nbsp; 
                        <asp:Button ID="updateButton" Text="Update" Visible='<%# same as previous, just on update %>' runat="server" CommandName="Update" />&nbsp; 
                        <asp:Button ID="cancelButton" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" /> 
                      </EditItemTemplate> 
                      <HeaderStyle /> 
                      <ItemStyle HorizontalAlign="Right" /> 
                    </telerik:GridTemplateColumn> 
                  </Columns> 
              </telerik:RadGrid> 
            </td> 
          </tr> 
          <tr> 
            <td> 
              <asp:Button ID="addMaster" Text="Add" Visible='<%# (masterGrid.IxMasterTableView.IsItemInserted) %>' runat="server" CommandName="PerformInsert" />&nbsp; 
              <asp:Button ID="updateMaster" Text="Update" Visible='<%# !(masterGrid.IxMasterTableView.IsItemInserted) %>' runat="server" CommandName="Update" />&nbsp; 
              <asp:Button ID="cancelMaster" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" /> 
            </td> 
          </tr> 
        </table> 
      </FormTemplate> 
    </EditFormSettings> 
  </IxMasterTableView> 
</telerik:RadGrid> 

and here is some codebehind for onItemCommand
DataKey oldKeyValues = e.Item.OwnerTableView.DataKeyValues[0]; 
RadGrid detailRadGrid = (sender as RadGrid); 
 
if (e.CommandName == RadGrid.InitInsertCommandName) { 
  detailRadGrid.Save(false); 
  aoGridCommandEventArgs.Canceled = true; 
  System.Collections.Specialized.ListDictionary newKeyValues = new System.Collections.Specialized.ListDictionary(); 
  if (loDataKey != null) { 
    newKeyValues["Col1"] = oldKeyValues["Col1"]; 
    newKeyValues["Col2"] = oldKeyValues["Col2"]; 
    newKeyValues["Col3"] = oldKeyValues["Col3"]; 
    newKeyValues["Col4"] = oldKeyValues["Col4"]; 
    e.Item.OwnerTableView.InsertItem(newKeyValues); 
  } 
} 

same is for masterGrid...
So, my question would be...how can i add and save value in detailGrid, because this way it is not functioning, and is it possible to filter detailGrid rows to display only rows that are related to masterGrid column that is not in KeyColumns ?
and how can i check which row in rows 33 and 34 (of first code part) will be visible based on logic in rows 46 and 47 ?
Some example of how to use this would be great...i'm stuck here fot 10 days and can't move any further...
Thanks for reply...
Tsvetoslav
Telerik team
 answered on 12 Mar 2009
1 answer
101 views
I have the problem where, when my grid is shown in a reduced space, i.e. not the whole page, and the columns all shrink, but the inputs in the filter row seem to keep the column width, and not shrink proportionally to allow the filter icon to remain visible.  Any suggestions?
Yavor
Telerik team
 answered on 12 Mar 2009
1 answer
91 views
Hi Team,

Is there a way to access the opposite of the ClientEvents-OnColumnContextMenu event? What I am trying to accomplish is having the user right-click on the columns, and specify one to many columns to display / hide, and when they are are done selecting the columns to perform an ajax request to resize the width of the grid.

I have tried to wire to the event ClientEvents-OnColumnHidden and ClientEvents-OnColumnShown but these events fire every time that a single column is hidden or shown, and the ajax processing causes the context menu to close, preventing the user from selecting / deselecting all of the desired columns.

Any help is appreciated.

-Matt
Yavor
Telerik team
 answered on 12 Mar 2009
1 answer
67 views
I have filters on my radgrid.  One of my columns is a checkbox column:
<radg:GridTemplateColumn HeaderStyle-Width="40px" ItemStyle-Width="40px" AllowFiltering="false"  
                                        HeaderText="In/Out" UniqueName="ownershipcolumn"> 
                                       <ItemTemplate> 
                                          <asp:CheckBox AutoPostBack="true" id="chkOwned" runat="server"></asp:CheckBox> 
                                       </ItemTemplate> 
                                    </radg:GridTemplateColumn> 

After I filter the grid my gridcommandeventargs always have an e.item with a TypeOf "GridFilteringItem" instead of a "GridDataItem."

It's like the filter is the only thing sending events now instead of whichever row/control I click on.  The GridFilteringItem always has a DataItem = Nothing as well.

Since the filter is the only thing firing events I cannot capture my CheckBox.CheckChanged event.

Any hints?


Yavor
Telerik team
 answered on 12 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?