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

Hi all,

I have a RadGridView with BachEdit. I start editing when click on cell and save changes with a save button of radgrid.

I need 2 things and i cant reach how.

1º I need reject the edit mode of cell in some cells (Ex cell 2 column 3).

2º I need get whole information of cells/columns when i click Save changes.I think BachEdit mode are some different...

 

Thz for your time

Eyup
Telerik team
 answered on 18 Oct 2016
1 answer
176 views

Hi,

Can anybody help me to solve this issue?

I am using RadComboBox and have an issue about this control. I am creating RadComboBox on server side and keep this control as Html like in .png. Everthing works fine on this situation. But when I try to update items for adding or removing any item, rcbSlide in body not updated, thats why combox does not display updated items. How can sync both rcbSlide in body and radcombox div? I tried copy html from div to body but, it does not work. Also when I close and reopen project new items displayed in combo. It seems body cache the items but I can not find have can I refresh items?

Please look at attached screenshots, 

CreateRadComboBox.PNG for creating html for RadComboBox

rcbSlide_InDIV.PNG for displayed updated combo in UI

rcbSlide_InBody.PNG for html that stored in body.

 

 

Veselin Tsvetanov
Telerik team
 answered on 18 Oct 2016
0 answers
66 views

I have a button in which I don't want to use the alert box for a confirmation and I intend to use a jquery modal window for but I can't seem to get it to work. 

$('#grid').kendoGrid({
     ...
     editable: { confirmation:false, mode:'popup' } // this turns off the delete confirmation alert but allows popups
     ...
});

I've tried adding a click event inside the grid script and outside, but nothing is triggering the event.
As a test, I used the 'a' tag but nothing is working yet.
$('a').click(function(e){
        e.preventDefault();
        e.stopPropagation();
        var title = '<span class="warning">Warning</span>';
        $.get('/main/test'), function(data){
               test(data, modal.large, title);
        });
});

I'd use a custom kendotemplate but I am using a custom jquery modal instead and I can't seem to trigger it.

Keith
Top achievements
Rank 1
 asked on 17 Oct 2016
0 answers
113 views

I have a button in which I don't want to use the alert box for a confirmation and I intend to use a jquery modal window for but I can't seem to get it to work. 

$('#grid').kendoGrid({

     ...

     editable: { confirmation:false, mode:'popup' } // this turns off the delete confirmation alert but allows popups

     ...

});

I've tried adding a click event inside the grid script and outside, but nothing is triggering the event.

As a test, I used the 'a' tag but nothing is working yet.

$('a').click(function(e){

        e.preventDefault();
        e.stopPropagation();
        var title = '<span class="warning">Warning</span>';

        $.get('/main/test'), function(data){

               test(data, modal.large, title);

        });

});

I'd use a custom kendotemplate but I am using a custom jquery modal instead and I can't seem to trigger it.

Keith
Top achievements
Rank 1
 asked on 17 Oct 2016
5 answers
208 views

Hi,

First of all, I'm using the latest version of your Telerik.Web.UI.dll (2016.3.914.40). I'm trying to set RadDropDownTree HeaderTemplate dynamically as I did for RadComboBox. Here is my code :

 

<telerik:RadDropDownTree ID="RadDropDownTree" runat="server" EnableViewState="false" CheckBoxes="None"      OnNodeDataBound="RadDropDownTree_NodeDataBound" <br>    DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" DataValueField="Value"<br>    Width="100%" RenderMode="Lightweight" Visible="false" Skin="Metro"><br></telerik:RadDropDownTree>

Ivan Danchev
Telerik team
 answered on 17 Oct 2016
1 answer
566 views

I'm really struggling to work this out. My grid columns are currently:

 

columns.ForeignKey(c => c.CustomerId, (System.Collections.IEnumerable)ViewData["CustomersDropDown"], "Id", "Name").Title("Customer Name");
columns.Bound(c => c.Filename).Title("File"));
columns.Bound(c => c.Schema).Title("Schema"));//.EditorTemplateName("EnumDropDown");

 

The ForeignKey field displays fine and I'm happy with it. The "Schema" field (last line) is an enumerated type. Now the way this dropdown looks when the grid is in edit mode is vastly different to what the ForeignKey dropdown looks like. OK, so I just want to apply the same CSS in edit mode. However, I can't seem to find out how. I've tried adding a template which I don't think I got right (code below, or at least my last attempt at it) in order to add the CSS. It seems, from searching, that my only recourse is to take the enumerated type, turn it into a selectlist in the back end simply so I can use the ForeignKey property of Kendo UI instead of Bound. This seems a little long way to go simply to apply some CSS while in edit mode. The grid, functionally works fine otherwise.

 

My EnumDropDown as it stands now, though has gone through many previous edits in an effort to get it going. This current incarnation seems to format it, but displays no data.

 

@model Common.Schema
 
@(Html.Kendo().DropDownListFor(m => m)
    .BindTo(Enum.GetNames(typeof(Common.Schema)))
    .HtmlAttributes(new { style = "k-dropdown" })
)
Eyup
Telerik team
 answered on 17 Oct 2016
1 answer
129 views

hi

how do i change the background color all white? As you can see from the attachment there are some white and gray. Thanks a lot 

Bozhidar
Telerik team
 answered on 17 Oct 2016
1 answer
207 views

The group panel for drag and drop grouping at the top of the grid contains nested tables.  See sample markup below.  Those tables contain empty TH elements which are not displayed (display=none), but still generate errors by our WAI accessibility checker tool.  Is there a property I can set that will set the text for those TH elements?  I've set the 3 offending TH elements in bold below.

 

Thanks,

 

Ray

 

 

<div id="ctl00_MasterHolder_rgdUsrReport_GroupPanel" style="width:100%;">
<table id="ctl00_MasterHolder_rgdUsrReport_GroupPanel_TB" class="rgGroupPanel" summary="The table which holds all grouping nested tables and is used as a wrapper." style="width:100%;border-spacing:0;border-collapse:separate;" role="presentation">
<caption>
MainTable
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<td><table summary="The nested grouping table which holds the group items table holding all grouped column items." style="width:100%;border-spacing:0;">
<caption>
Nested Grouping Table
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<td><table cellpadding="2" summary="The table holding all group items which are positioned in the group panel." style="border-style:None;width:100%;border-spacing:0;">
<caption>
Group Items Table
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<th scope="col" title="Drag out of the bar to ungroup" class="rgGroupItem" style="white-space: nowrap; cursor: move;">Data Collection Name&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl03" value=" " onclick="javascript:__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl03','')" title="Sorted asc" class="rgSortAsc">&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl04" value=" " onclick="$find('ctl00_MasterHolder_rgdUsrReport').get_masterTableView()._ungroupByExpression('0:0'); return false;__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl04','')" title="Click here to ungroup" class="rgUngroup"></th><td>-</td><th scope="col" title="Drag out of the bar to ungroup" class="rgGroupItem" style="white-space: nowrap; cursor: move;">Institution Name&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl06" value=" " onclick="javascript:__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl06','')" title="Sorted asc" class="rgSortAsc">&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl07" value=" " onclick="$find('ctl00_MasterHolder_rgdUsrReport').get_masterTableView()._ungroupByExpression('0:1'); return false;__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl07','')" title="Click here to ungroup" class="rgUngroup"></th><td style="width:100%;"></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</div>

Pavlina
Telerik team
 answered on 14 Oct 2016
5 answers
291 views

Hi,

I can assign css style for Radgrid Frozen div using Radgrid name

div.RadGrid #rgGrid_Frozen
      {
           overflow-y: auto !important;
           overflow-x: auto !important;
      }

But i want to use this one globally like without Radgid ID.

This code is not working

div.RadGrid div#_Frozen
      {
           overflow-y: auto !important;
           overflow-x: auto !important;
      }

 

Please let me know 

 

Thanks,

 

Kostadin
Telerik team
 answered on 14 Oct 2016
12 answers
1.0K+ views
Hi,

Telerik controls version: 2014.2.724.45

I have a RadGrid with EditMode="Batch". This RadGrid has a GridTemplateColumn with a RadComboBox in EditItemTemplate. If a description with a special character (<, >, ...) appears in RadComboBox, OldValues in BatchEditCommand has an incorrect value.

Modify Comment field and click Save button. In NewValues["ID_SLOT"] you can see value 4,5 (incorrect).

Another issue OldValues["ID_SLOT"] is not present.

<telerik:RadCodeBlock ID="mainRadCodeBlock" runat="server">
            <script type="text/javascript">
                function saveChanges() {
                    var grid = $find("<%=GridExample.ClientID %>");
                grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
            }
 
            </script>
        </telerik:RadCodeBlock>
 
        <asp:Button ID="btnSave" runat="server" Text="Save" ToolTip="Save changes to database" OnClientClick="saveChanges();return false;" />
 
        <telerik:RadGrid ID="GridExample" runat="server" AutoGenerateColumns="false"
            Skin="Simple"
            AllowPaging="False"
            AllowSorting="false"
            AllowFilteringByColumn="true"
            OnBatchEditCommand="GridExample_BatchEditCommand"
            OnNeedDataSource="GridExample_NeedDataSource">
            <GroupingSettings CaseSensitive="false" />
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView HeaderStyle-HorizontalAlign="Center" Width="100%" AutoGenerateColumns="false"
                DataKeyNames="ID_COUNTRY"
                EditMode="Batch">
                <BatchEditingSettings EditType="Cell" OpenEditingEvent="MouseOver" />
                <Columns>
                    <telerik:GridBoundColumn DataField="COMMENTS" HeaderText="Comments" HeaderTooltip="Comments" HeaderStyle-Width="100px" ItemStyle-Width="100px" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%"></telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%" UniqueName="SLOT" HeaderText="Slot" DataType="System.Int32" DataField="ID_SLOT" SortExpression="SLOT" ColumnGroupName="Devices" HeaderStyle-Width="150px" ItemStyle-Width="150px">
                        <ItemTemplate>
                            <%# Eval("SLOT") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="ddlSLOT" runat="server"
                                EnableLoadOnDemand="true"
                                Filter="Contains"
                                AllowCustomText="false"
                                DataTextField="SLOT"
                                DataValueField="ID_SLOT"
                                OnItemsRequested="ddlSLOT_ItemsRequested"
                                Style="width: 135px;" class="caronte-portfolio-ddl-slot">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>


protected void GridExample_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID_COUNTRY", typeof(int));
        table.Columns.Add("COMMENT", typeof(string));
        table.Columns.Add("ID_SLOT", typeof(int));
        table.Columns.Add("SLOT", typeof(string));
 
        DataRow row = null;
        for (int i = 0; i < 5; i++)
        {
            row = table.NewRow();
            row["ID_COUNTRY"] = i;
            row["ID_SLOT"] = 1;
            row["SLOT"] = "Flagship < 4,5\" SP";
 
            table.Rows.Add(row);
        }
 
        (sender as RadGrid).DataSource = table;
    }
 
    protected void ddlSLOT_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID_SLOT", typeof(int));
        table.Columns.Add("SLOT", typeof(string));
 
        DataRow row = table.NewRow();
        row["ID_SLOT"] = 1;
        row["SLOT"] = "Flagship < 4,5\" SP";
 
        table.Rows.Add(row);
 
        RadComboBox ddlSlot = sender as RadComboBox;
        ddlSlot.DataSource = table;
        ddlSlot.DataBind();
    }
    protected void GridExample_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        foreach (GridBatchEditingCommand command in e.Commands)
        {
             
        }
    }


Thanks in advance.

Alfonso
Vasil
Telerik team
 answered on 14 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?