Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
371 views

Hello

I have a little problem with a GridButtonColumn in a RadGrid. First of all, the grid is completeley created by code. I need to manage editing, insert and delete operations. Everythimg works good, except that I would like to have a confirm message before the delete command occurs.

Here follows the code:

RadGrid grid = new RadGrid();
grid.ID = "instGrid";
grid.DataSourceID = "sqlInst";
grid.PageSize = 15;
grid.AllowPaging = true;
grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
grid.AutoGenerateColumns = false;
grid.AllowAutomaticUpdates = false;
grid.AllowAutomaticInserts = false;
grid.AllowAutomaticDeletes = false;
grid.ItemCommand += new GridCommandEventHandler(instGrid_ItemCommand);
 
//2.1 Add Customers table 
grid.MasterTableView.DataKeyNames = new string[] { "id_badmstorage", "value" };
grid.MasterTableView.EditMode = GridEditMode.EditForms;
grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
GridBoundColumn boundColumn = new GridBoundColumn();
boundColumn.DataField = "id_badmstorage";
boundColumn.HeaderText = "ID";
boundColumn.ReadOnly = true;
grid.MasterTableView.Columns.Add(boundColumn);
 
//2.2 SET SQL DATA SOURCE...
 
sqlInst.SelectCommand = "SELECT * FROM DataTable WHERE variableID=" + bv.ID + " AND siteID=438 AND dataStatus=0";
//3. Add grid columns...
GridTemplateColumn tempC = null;//new GridTemplateColumn();
tempC = new GridTemplateColumn();
tempC.DataField = "value";
tempC.HeaderText = bv.Name;
tempC.ItemTemplate = new MyTemplate("value", bv.CvIndex, true);
tempC.EditItemTemplate = new CustomEditTemplate("value", true, bv.Unit, bv.CvIndex);
grid.MasterTableView.Columns.Add(tempC);
 
//4. Edit commands
GridEditCommandColumn eCol = new GridEditCommandColumn();
grid.MasterTableView.Columns.Add(eCol);
eCol.UniqueName = "EditCommandColumn";
 
//5. delete command
GridButtonColumn delCol = new GridButtonColumn();
grid.MasterTableView.Columns.Add(delCol);
delCol.HeaderText = "Delete";
delCol.UniqueName = "Delete";
delCol.CommandName = "Delete";
delCol.ConfirmDialogType = GridConfirmDialogType.Classic;
delCol.ConfirmTitle = "Delete";
delCol.ButtonType = GridButtonColumnType.ImageButton;
 
// Add the grid to the placeholder 
this.PlaceHolder1.Controls.Add(grid);
 
//AJAX SETTINGS...
AjaxSetting ajax = new AjaxSetting(grid.ID);
AjaxUpdatedControl up=new AjaxUpdatedControl();
up.ControlID=grid.ID;
ajax.UpdatedControls.Add(up);
up = new AjaxUpdatedControl();
ajax.UpdatedControls.Add(up);
RadAjaxManager1.AjaxSettings.Add(ajax);

The grid is created in the Page_Init event

A preview of the page can be found at this link (select INST_MODEL from the list)

If you try to delete a record, no confirm window appears (deletion is disabled for now)

Thanks

Diego​

Eyup
Telerik team
 answered on 24 Nov 2015
3 answers
120 views

I have a grid that uses a form template for editing the grid items.  When the user clicks the edit command for a row in the grid it opens the FormTemplate that contains a FileExplorer.  I need to then set the configuration path of the file explorer as it's different for each item in the grid.

It seems the FileExplorer paths can only be set on the page_load event, but at that time I don't have access to the GridEditFormItem that allows me to get the file explorer control and set the paths.

Is there a way to make this work?  It seems pretty strange that the view paths can only be set in the page_event.

Thanks

 

Eyup
Telerik team
 answered on 24 Nov 2015
3 answers
137 views

Hi,

I use RadComboBox all over my website.  However, I'm now on the 2015 version, Q3, and the RadComboBox works great for the first couple of attempts.  But when you click it again, and drag down, sometimes the mouse is 3 higher than the highlighted option in the combo box. It's hard to show a screenshot, but I'd be grateful if somebody could provide some assistance, or ways to fix this. 

Magdalena
Telerik team
 answered on 24 Nov 2015
1 answer
132 views
Will there be Excel like Cell Borders with multiple weights? If so, what perfromance/time do you expect that a border could be applied to a range eg. 1000 cells x Left Border?
Bozhidar
Telerik team
 answered on 24 Nov 2015
15 answers
482 views
I have a grid that is set up for paging with only 5 records displayed per page. When an item is queried in Firefox it takes no time at all to pull up however when a query is done in IE, it takes forever. I've tried it in both IE7 and IE8 with the same results in both. Because it's doing this on my machine and the rest of the users...I can only assume it's a conflict with the control and the browser.

Any help would be greatly appreciated!
Konstantin Dikov
Telerik team
 answered on 24 Nov 2015
1 answer
302 views
Hi,
I updated the latest version of Telerik ASP NET AJAX (Q3 2015.3.1111.40) but now I have problems because it does not recognize "jquery", the browser shows me "Uncaught ReferenceError: $ is not defined". Every time there is a new version of Telerik always update my application references. Until version "Q3 2015.3.930.40" I have not had this kind of problem but now with the latest version of Telerik have this big problem.

I appreciate a prompt response.

Thank you
Ianko
Telerik team
 answered on 24 Nov 2015
1 answer
130 views

Hi Telerik Team,

We are using RadDialogOpener to open DocumentManager and ImageManager. In the *manager popup window,when you select a file, there have "css class" property on the right side. We can add css class if we use editor to open these two managers. Can we add css classes if we use RadDialogOpener control to open? You can see the attachment for detailed information.

 Thanks,

Lan

 
Ianko
Telerik team
 answered on 24 Nov 2015
1 answer
95 views
I am using the edmx way of entity frame work and I have a issue I want to be able to display the name of a related table instead of its value in the main column below is how I am declaring my grid and I do have a froreign key assocation as setup on db end
    <asp:ScriptManager ID="sptgrdSoccerPlayers" runat="server"></asp:ScriptManager>
     
    <telerik:RadGrid ID="grdSystemEmails" RenderMode="Auto" runat="server" AutoGenerateColumns="False"    GroupPanelPosition="Top" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" OnItemCommand="RadGrid1_ItemCommand" CellSpacing="-1" GridLines="Both" AllowAutomaticDeletes="True" DataSourceID="entyEmails">
        
        <MasterTableView  DataKeyNames="id" DataSourceID="entyEmails"  EditMode ="PopUp" >    
                <Columns>
                <telerik:GridBoundColumn DataField="id" DataType="System.Guid" FilterControlAltText="Filter id column" HeaderText="id" ReadOnly="True" SortExpression="id" UniqueName="id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="name" FilterControlAltText="Filter name column" HeaderText="name" SortExpression="name" UniqueName="name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="subject" FilterControlAltText="Filter subject column" HeaderText="Subject" SortExpression="subject" UniqueName="subject">
                </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="authCreatedDate" DataType="System.DateTime" FilterControlAltText="Filter authCreatedDate column" HeaderText="authCreatedDate" SortExpression="authCreatedDate" UniqueName="authCreatedDate">
                </telerik:GridBoundColumn>
                     <telerik:GridCheckBoxColumn DataField="isActive" DataType="System.Boolean" FilterControlAltText="Filter isActive column" HeaderText="isActive" SortExpression="isActive" UniqueName="isActive">
                </telerik:GridCheckBoxColumn >
                     
                     
            </Columns>
        </MasterTableView>
 
<FilterMenu RenderMode="Auto"></FilterMenu>
 
<HeaderContextMenu RenderMode="Auto"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="entyEmails" runat="server" ConnectionString="name=soccerEntities" DefaultContainerName="soccerEntities" EnableFlattening="False" EntitySetName="systemEmails" ></asp:EntityDataSource>

 

 

This is the screen shot of the  edmx file showing the assocation So what I want to show is the value in the  email type description value in my grid instead of its guid.

 

 

Konstantin Dikov
Telerik team
 answered on 24 Nov 2015
0 answers
130 views

Radcombobox does not load data custom use control. Every time user control loads the rad combo box does not loads the data. Is it possible to load the rad combobox used on custom user control ?

 

CreatefolderUC.ascx.cs

 

public partial class CreateFolderUC : System.Web.UI.UserControl
{
    protected void RadComboBox1_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        GetGroupList();
    }

}

 

 

 CreatefolderUC.ascx

            <telerik:RadComboBox ID="RadComboBox1" Runat="server" Width="200px" CheckBoxes="True" 
                OnItemsRequested="RadComboBox1_ItemsRequested" EnableCheckAllItemsCheckBox="True"  Localization-CheckAllString="All" 
                EmptyMessage="--Select--" CheckedItemsTexts="DisplayAllInInput">
            </telerik:RadComboBox>

pavan
Top achievements
Rank 1
 asked on 24 Nov 2015
2 answers
224 views
Hi,

My other grids are working fine - but this one doesn't display any skin whatsoever, even if I change the skin.  Please see attached images illustrating the problem.

Code is below;  please help.

<telerik:RadGrid ID="grdEmail" runat="server" AllowFilteringByColumn="True" EnableAjaxSkinRendering="true" AllowPaging="True" Width="900px" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" onitemcommand="grdEmail_ItemCommand" onneeddatasource="grdEmail_NeedDataSource">
  <MasterTableView>
    <RowIndicatorColumn>
      <HeaderStyle Width="20px"></HeaderStyle>
  </RowIndicatorColumn>
  <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
  </ExpandCollapseColumn>
  <Columns>
    <telerik:GridBoundColumn HeaderText="Service No." UniqueName="serviceNumber" DataField="serviceNumber">
   </telerik:GridBoundColumn>
 etc...
  </Columns>
</MasterTableView>
</telerik:RadGrid>


Kind regards,
James
Hugo
Top achievements
Rank 1
 answered on 24 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?