Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
168 views

Hello,  I need to make the text in a cell flash/blink based on a calculation.  I appreciate any suggestions you may have to accomplish this.

 

Thank you

Viktor Tachev
Telerik team
 answered on 23 Sep 2015
2 answers
183 views

in the OnClientItemClicked event the clickedMenuItem is null and the hidden form field which is set in the RowContextMenu is null? Am i using the right event?

in RowContextMenu "hiddenClientID" is correctly set to the ClientID key field

// process content menu
   function RowContextMenu(sender, eventArgs) {
 
       var colIndex = eventArgs.get_domEvent().target.cellIndex;
       var rowIndex = eventArgs.get_itemIndexHierarchical();
       var masterTable = sender.get_masterTableView();
 
       cell = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[rowIndex], "ClientID");
       var ClientID = cell.innerHTML; // 
       document.getElementById("hiddenClientID").value = ClientID; 
       var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;
       var menu = $find("<%=RadContextMenu1.ClientID %>");
           var evt = eventArgs.get_domEvent();
           if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
               return;
           }
           var index = eventArgs.get_itemIndexHierarchical();
           sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
           menu.show(evt);
 
           evt.cancelBubble = true;
           evt.returnValue = false;
 
           if (evt.stopPropagation) {
               evt.stopPropagation();
               evt.preventDefault();
           }
       }
   function contextMenuItemClicked(sender, args) {
       var clickedMenuItem = args.get_item().get_value();
       var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;
       var grid = $find('<%= RadGrid1.ClientID %>');
       var masterTableView = grid.MasterTableView;
       var row = masterTableView.get_dataItems()[radGridClickedRowIndex];
       var cell = masterTableView.getCellByColumnUniqueName(row, "ClientID");
 
       if (clickedMenuItem == "Edit") {
           editClient();
       }
       if (clickedMenuItem == "Calendar") {
           AddAppoint(cell.innerHTML);
       }

 

<telerik:RadContextMenu ID="RadContextMenu1" runat="server" OnClientItemClicked="contextMenuItemClicked"             EnableRoundedCorners="true" EnableShadows="true" Skin="Metro">           
  <Items>                 <telerik:RadMenuItem Text="Select"    />                 <telerik:RadMenuItem Text="Calendar"    />                 <telerik:RadMenuItem Text="Contact" />                 <telerik:RadMenuItem Text="Edit" />                 <telerik:RadMenuItem Text="Payment" />                                 <telerik:RadMenuItem Text="Archive" />             </Items>         </telerik:RadContextMenu>

  // process content menu     function RowContextMenu(sender, eventArgs) {         var colIndex = eventArgs.get_domEvent().target.cellIndex;         var rowIndex = eventArgs.get_itemIndexHierarchical();         var masterTable = sender.get_masterTableView();         cell = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[rowIndex], "ClientID");         var ClientID = cell.innerHTML; // get the lecturesID so it can be processed in the code behind         document.getElementById("hiddenClientID").value = ClientID; // stuff it in a form variable so we can get inthe code behind         var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;         var menu = $find("<%=RadContextMenu1.ClientID %>");             var evt = eventArgs.get_domEvent();             if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {                 return;             }             var index = eventArgs.get_itemIndexHierarchical();             sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);             menu.show(evt);             evt.cancelBubble = true;             evt.returnValue = false;             if (evt.stopPropagation) {                 evt.stopPropagation();                 evt.preventDefault();             }         }     function contextMenuItemClicked(sender, args) {         var clickedMenuItem = args.get_item().get_value();         var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;         var grid = $find('<%= RadGrid1.ClientID %>');         var masterTableView = grid.MasterTableView;         var row = masterTableView.get_dataItems()[radGridClickedRowIndex];         var cell = masterTableView.getCellByColumnUniqueName(row, "ClientID");         alert(clickedMenuItem);             alert(cell);         if (clickedMenuItem == "Edit") {             editClient();         }         if (clickedMenuItem == "Calendar") {             AddAppoint(cell.innerHTML);         }           }
  // process content menu     function RowContextMenu(sender, eventArgs) {         var colIndex = eventArgs.get_domEvent().target.cellIndex;         var rowIndex = eventArgs.get_itemIndexHierarchical();         var masterTable = sender.get_masterTableView();         cell = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[rowIndex], "ClientID");         var ClientID = cell.innerHTML; // get the lecturesID so it can be processed in the code behind         document.getElementById("hiddenClientID").value = ClientID; // stuff it in a form variable so we can get inthe code behind         var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;         var menu = $find("<%=RadContextMenu1.ClientID %>");             var evt = eventArgs.get_domEvent();             if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {                 return;             }             var index = eventArgs.get_itemIndexHierarchical();             sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);             menu.show(evt);             evt.cancelBubble = true;             evt.returnValue = false;             if (evt.stopPropagation) {                 evt.stopPropagation();                 evt.preventDefault();             }         }     function contextMenuItemClicked(sender, args) {         var clickedMenuItem = args.get_item().get_value();         var radGridClickedRowIndex = document.getElementById("hiddenClientID").value;         var grid = $find('<%= RadGrid1.ClientID %>');         var masterTableView = grid.MasterTableView;         var row = masterTableView.get_dataItems()[radGridClickedRowIndex];         var cell = masterTableView.getCellByColumnUniqueName(row, "ClientID");         alert(clickedMenuItem);             alert(cell);         if (clickedMenuItem == "Edit") {             editClient();         }         if (clickedMenuItem == "Calendar") {             AddAppoint(cell.innerHTML);         }           }
Viktor Tachev
Telerik team
 answered on 23 Sep 2015
12 answers
418 views

I have RadTreeView control inside a NestedViewTemplate of a RadGrid.

I want to reference this control in code behind so I can bind data to it, however I'm unsure of how to do this.

I was thinking it is something along this line:

Dim

RadTreeView1 As RadTreeView = CType(RadGrid2.MasterTableView.GetItems(GridItemType.NestedView.FindControl("RadTreeView1"), RadTreeView))

But this is incorrect. Can someone point me in the right direction

Gayathri
Top achievements
Rank 1
 answered on 23 Sep 2015
1 answer
82 views

I was wondering if you can export each page of a grid to a separate excel sheet in the same excel file using Telerik

if no I would be grateful if you pointed me to like to how to do it using native ASP.NET code

 

Daniel
Telerik team
 answered on 23 Sep 2015
2 answers
196 views

I am having a trouble in implementing below requirement.
Current RadGrid: Attached (Snapshot 1) is the RadGrid in which I am using GroupByExpressions to display/show data grouped with "Business Unit" column.
In RadGrid column 2nd(InvoiceLineNo) and 3rd(InvoiceNo), I am auto generating the numbers using Stored Procedure.

i.e., for "InvoiceLineNo" column, Autogenerated No's are: 01,02,03,04,05,06,07,08.......n 
for "InvoiceNo" column, Autogenerated No's are: 15100001, 15100002, 15100003........n 
where, 15 is a "year" and 100001 are "running numbers"

Requirement is: I want to show the "InvoiceLineNo" column data as Group wise. 
Example:
for 1st "Business Unit" group (i.e., SUNWAY LEISURE SDN BHD (CARNIVAL)), InvoiceLineNo shall be: 01,02,03,04,05,06,07,08
for 2nd "Business Unit" group (i.e., SUNWAY MALL PARKING SDN BHD), InvoiceLineNo shall be: 01,02,03,04,05,06,07,08

Similarly, I want to show the "InvoiceNo" column data as Group wise.
Example:
for 1st "Business Unit" group (i.e., SUNWAY LEISURE SDN BHD (CARNIVAL)), InvoiceNo shall be: 15100001,15100001,15100001,15100001,15100001,15100001,15100001,15100001
for 2nd "Business Unit" group (i.e., SUNWAY MALL PARKING SDN BHD), InvoiceNo shall be: 15100002,15100002,15100002,15100002,15100002,15100002,15100002,15100002

"InvoiceNo" column data will always be unique for different "Business Unit". 

I want output to be like attached snapshot​ 2.

I can autogenerate the numbers serial wise but I am not getting how to autogenerate the 2 column values based on Group and show them like that.
Please help me to achieve it. Please do reply.
Thanks in advance.

Priyanka
Top achievements
Rank 1
 answered on 23 Sep 2015
1 answer
79 views

Hello,
I'm trying to apply a custom sorting on a grid datascource in the onsortcommand event
my datascource is Programmatically set and apparently whenever I try to retrieve it in the event I find the object is assigned to null

I'm using custom paging on my grid so there's no way to sort the records using the sorting expression without disabling virtual paging first

can you be guys of any help please??

Viktor Tachev
Telerik team
 answered on 23 Sep 2015
5 answers
114 views

After upgrading Web dll's from version 2012.n to 2015.n the CSS property for the tristate.png is being set to incorrect values regardless of the .rtChecked, etc values are being set to (and have been set to). The values in the TreeView.css file are:

.RadTreeView .rtChecked { background-position: 0 0; }
.RadTreeView .rtUnchecked { background-position: 0 -13px; }
.RadTreeView .rtIndeterminate { background-position: 0 -26px; }

 

The values are being overridden from the now being set to:

.RadTreeView .rtChecked { background-position: 0 -40; }
.RadTreeView .rtUnchecked { background-position: 0 0; }
.RadTreeView .rtIndeterminate { background-position: 0 -80px; }

 

The dom explorer (in IE) is saying that this setting is held in the WebResource.axd file, which is a file dynamically created by the runtime.

 

Does anyone have any idea where these background-positions values are being set from so I can correct it, or help me understand what happened during the upgrade that caused these settings?

 

Thank you!

Jason

Magdalena
Telerik team
 answered on 23 Sep 2015
5 answers
114 views
I have the the combo box filter template, but how can I also get the filter button? I don't want to filter on index change, I want to apply multiple filters and be able to select "NotEqualTo" for combo box selections.
Konstantin Dikov
Telerik team
 answered on 23 Sep 2015
1 answer
197 views

Hello,

I have a Gantt chart with tasks and dependencies.

Can anyone tell me how can I update "Start" and "End" of the tasks if it's parent task's "End" date is updated.

I tried doing the following code (@screenshot) in the TaskUpdate event, but it just refreshes the page, nothing else.

Any help will be appreciated. Thank you.

Regards,

 
Bozhidar
Telerik team
 answered on 23 Sep 2015
2 answers
101 views

Hi Telerik,

 

We have a grid with an ItemTemplate code that contains a RadComboBox

<telerik:RadComboBox runat="server" ID="RadComboBoxEventNotAttending" Width="155px" CheckBoxes="true" DropDownAutoWidth="Enabled" AutoPostBack="true" EmptyMessage="Select Not Attending" EnableCheckAllItemsCheckBox="true"
    OnItemChecked="RadComboBoxEventNotAttending_ItemChecked" OnCheckAllCheck="RadComboBoxEventNotAttending_CheckAllCheck" OnDataBinding="RadComboBoxEventNotAttending_DataBinding"
    Label='<%# Eval("EventSubId")%>' LabelCssClass="myLabelHide" >
    <Localization AllItemsCheckedString="Family not attending" CheckAllString="Select All" ItemsCheckedString="Member(s) not attending" />
    <CollapseAnimation Type="InExpo" />
    <ExpandAnimation Type="OutExpo" />
    <HeaderTemplate>
        <asp:Label runat="server" Font-Size="8" Text="Not Attending" />
    </HeaderTemplate>
</telerik:RadComboBox>
 

Every Item for the grid could have different drop down items and checks for their respective repeating RadComboBoxes depending on the scenario, which is all handled fine with the OnDataBinding for each record in the grid datasource. When the user checks an item in the dropdown it does a whole postback for the grid. We would like it to only do a postback for the RadComboBox and show a LoadingPanel around the RadComboBox itself instead of showing around the grid.

Our grid is wrapped in a ASP Panel and is used in the RadAjaxManager. The RadComboBox could be wrapped in a ASP Panel and used the same way. We are not sure this is possible for it to be used inside a grid like this.

Could you supply some information or some code snippet for this type of situation?

Thanks!!!

 

Konstantin Dikov
Telerik team
 answered on 23 Sep 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?