Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
313 views
Hi

I have a radgrid and I am binding the grid from codebehind using stored procedure.
I want edit ,delete images on each row.
On click of edit I should be able all the cells of that row.on delete it should delete the record.
can u just give me one sample?

Regards
Sreedhar
abhishek
Top achievements
Rank 1
 answered on 16 Aug 2016
1 answer
174 views

I am trying to alter the items collection of a radcombobox which is placed in a radtooltip with JS like

 

  <telerik:RadToolTip ID="tt_svg_combo" HideEvent="ManualClose" OffsetX="20" RenderMode="Lightweight" Skin="Default" Width="400" Height="400" runat="server">
       <telerik:RadComboBox ID="rcb_tooltip" runat="server"><Items>
            <telerik:RadComboBoxItem Text="aa" Value="aa" />
                                                             </Items></telerik:RadComboBox>
    </telerik:RadToolTip>

 

 

and JS:

  var ott
                    ott = $find("<%=tt_svg_combo.ClientID%>");
                    var combo = $find("<%= rcb_tooltip.ClientID%>");
                    var items = combo.get_items();
                    combo.trackChanges();
                    var comboItem

var str='1$2$3$4$5'
                    var a = str.split("$");

                    for (i = 0; i < a.length; i++) {
                        comboItem = new Telerik.Web.UI.RadComboBoxItem();
                        comboItem.set_text(a[i]);
                        comboItem.set_value(a[i]);
                        items.add(comboItem);
                    }

                    combo.commitChanges();
                }
              
                setTimeout(function () {
                    ott.show();
                }, 1000);

 

None of the added items are showing up on tooltip show.

When I place rcb on the page itself it works OK

Peter Milchev
Telerik team
 answered on 16 Aug 2016
7 answers
502 views
Hi, i'm building a grid from inverted database table. I had success with your help on GridDateTimeColumn but cant get a numeric textbox in autogenerate insert/edit mode
I get the datatype from a field in the table like

case

 

"datetime":

 

 

case "date":

 

 

case "time":

 

oType =

typeof(DateTime);

 

 

break;

 

 

case "int":

 

 

case "numeric":

 

oType =

typeof(Int32);

 

 

break;

and in ColumnCreated

 

if

 

(e.Column is GridDateTimeColumn && e.Column.UniqueName.Contains("Time"))

 

{

(e.Column

as GridDateTimeColumn).PickerType = GridDateTimeColumnPickerType.TimePicker;

thats all good, but ..

 

if (e.Column is GridNumericColumn

e.column is never a GridNumericColumn, even though the column is built as a Int32(stored as int in the table "Datatype" field

Thanks for any help

Maria Ilieva
Telerik team
 answered on 16 Aug 2016
2 answers
424 views

Hello,

I've been trying to solve the problem by myself for a while now, but in vain.

I have a RadGrid, in which I have a GridClientSelectColumn. I've written JS functions so that selection is saved in a HiddenField even if you navigate through the pages of the grid. The thing is, when I try to export as an Excel file, it doesn't work. I mean that, without adding "IgnorePaging = true", the currently selected rows only are exported. But if I add this property, I would expect that every "selected row" (I mean every row saved in the HiddenField) get exported. Instead, I just get a file with ALL the rows, no matter if they were selected or not. I've been checking the HiddenField content, and it is filled as expected, so I don't know where the problem could come from.

 

Here is the Excel export function : 

public void ExportExcel(RadGrid radGrid)
        {
  // If ignore paging is true, export all data even if not in HiddenField "memory"
            radGrid.ExportSettings.IgnorePaging = true;
            radGrid.ExportSettings.ExportOnlyData = true;
            radGrid.ExportSettings.OpenInNewWindow = true;
            radGrid.MasterTableView.GetColumn("SelectColumn").Visible = false;
  // From here we want to select only registered lines. Work if ignore paging is false
            int count = 0;
            foreach (GridDataItem dataItem in radGrid.MasterTableView.Items)
            {
                if(HiddenField1.Value.IndexOf("," + count + ",") < 0) {
                    dataItem.Visible = false;
                }
                count++;
            }
            radGrid.MasterTableView.ExportToExcel();
        }

Selected rows are "saved" in the hidden field with JS like this : 

function AddorRemoveIdInHiddenField(hf, id, IsAdd) {
 
                if (document.getElementById(hf).value == "") {
                    document.getElementById(hf).value = ",";
                }
 
                if (IsAdd == true) {
                    if (document.getElementById(hf).value.indexOf("," + id + ",") == -1) {
                        document.getElementById(hf).value = document.getElementById(hf).value + id + ",";
                    }
                }
                else if (IsAdd == false) {
                    if (document.getElementById(hf).value.indexOf("," + id + ",") >= 0) {
                      document.getElementById(hf).value = document.getElementById(hf).value.replace("," + id + ",", ",");
                    }
                }
            }

Here is my RadGrid code : 

<telerik:RadGrid ID="rgAgents" runat="server" RenderMode="Lightweight" Culture="fr-FR" OnNeedDataSource="rgAgents_NeedDataSource" AutoGenerateColumns="false" AllowPaging="True" AllowMultiRowSelection="true" OnItemCreated="rgAgents_ItemCreated" AllowSorting="True" GridLines="None" PageSize="15" MasterTableView-ExpandCollapseColumn-Display="false" AllowFilteringByColumn="true">
 <PagerStyle Mode="Slider" Position="Bottom" PageSizeControlType="None"></PagerStyle>
 <GroupingSettings CaseSensitive="false" />
 <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" DataKeyNames="ID" ClientDataKeyNames="ID">
  <NestedViewTemplate></NestedViewTemplate>
     <columns>
       <telerik:GridClientSelectColumn UniqueName="SelectColumn"></telerik:GridClientSelectColumn>
        <telerik:GridBoundColumn DataField="ID" HeaderText="ID" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Nom" HeaderText="Nom">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Prénom" HeaderText="Prénom">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Matricule" HeaderText="Matricule">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Groupe" HeaderText="Groupe">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Service" HeaderText="Service">
        </telerik:GridBoundColumn>
        <telerik:GridDateTimeColumn DataField="Mail" HeaderText="Mail" AllowFiltering="false">
        </telerik:GridDateTimeColumn>
        <telerik:GridBoundColumn DataField="Téléphone" HeaderText="Téléphone" AllowFiltering="false">
        </telerik:GridBoundColumn>
    </columns>
   </MasterTableView>
   <ClientSettings>
   <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
   <ClientEvents OnRowCreated="rgAgents_RowCreated" OnRowSelected="rgAgents_RowSelected"
            OnRowDeselected="rgAgents_RowDeselected" OnGridCreated="GridCreated" />
   </ClientSettings>
   </telerik:RadGrid>
   <asp:HiddenField ID="HiddenField1" runat="server" Value="" ClientIDMode="Static" />

Florent
Top achievements
Rank 1
 answered on 16 Aug 2016
5 answers
404 views
Hello Telerik Guys,

I need your quick help.

How do I remove the vertical scrollbar from the monthly view of the radscheduler? Thanks for your help.
Veselin Tsvetanov
Telerik team
 answered on 16 Aug 2016
1 answer
102 views

Can the boxplot type of chart be rotated 90 degrees to bars instead of column?

 

I am attempting to mimic something like this:

 

http://www.webquest.hawaii.edu/kahihi/mathdictionary/images/boxplot.png

Vessy
Telerik team
 answered on 16 Aug 2016
1 answer
85 views

Hi,  

I have radgrid created, populated dynamically from the cs page and it has horizontal scrollbar, I found the borders are missing at the right side when the grid appears, when I scroll to right I found the borders, I need to have borders intially and have gap between the horizontal scrollbar and the grid

Konstantin Dikov
Telerik team
 answered on 16 Aug 2016
3 answers
1.3K+ views

I'm exporting a grid to CSV. I've noticed when a value is null or blank, the resulting value is space. Using <ExportSettings Csv-EncloseDataWithQuotes="true" /> a blank value shows up as " " vs. "".

Is there a setting that can change this behavior? The files are being uploaded to another 3rd party tool, and a single space is not a valid option.

Greg S
Top achievements
Rank 1
 answered on 15 Aug 2016
2 answers
116 views

In a vb.net 2010 web form application, I am using the radeditor. I am using the editor from a version from 6 months ago. In this application, the template values are obtained from a templates editor setup for the administrator. The Template values look like &data.eval. These values are used in the application to replace that value with html in that application. I have added a few new values to this template due to the new html I want to replace the literals with. When I step through the code in a few situations, I do not see the new literals that look like &data.eval that I just created.

Thus would you tell me what you think is wrong and what I can do to solve the problem?

diane
Top achievements
Rank 1
 answered on 15 Aug 2016
1 answer
89 views

I have a GridButtonColumn with ButtonType="ImageButton". I'm accessing the button click client side with OnCommand of the RadGrid.

<ClientSettings >
   <ClientEvents OnCommand="OnCommand" />
</ClientSettings>

 

I know I can get the row through args.get_commandArgument(), but this is the row of the Master Table and works fine if my grouped table doesn't have a collapsed grouping, but fails horribly when there is a collapsed group.

 

<script type="text/javascript">
    function OnCommand(sender, args) {
        var rowIndex = args.get_commandArgument(); // getting row index
        var itemValue = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "itemName").innerHTML;
       }
</script>

 

For example, the rowIndex is determined to be 20 and and there are no collapsed rows so masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "itemName").innerHTML return the correct row and value. But say a group above has 10 rows collapsed then the 20 referes to something 10 down the table. The rowIndex value in this instance needs to be 10. 

 

So . . . what am I doing wrong. How to account for the collapsed rows? Should I be doing this differently?

 

TIA - Shawn

Eyup
Telerik team
 answered on 15 Aug 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?