Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
77 views

Hi,

I'm new developing using telerik and I have aproblem with the radgrid.

When I click in edit and then click in save the updatecommand does nothing.

Please help me and I really appreciate it.

Here's the code of the grid:

<telerik:RadGrid ID="rgControlPedidos" runat="server" RenderMode="Lightweight" AllowPaging="true"   AllowSorting="true"
             AutoGenerateColumns="false" ShowStatusBar="true" AllowMultiRowSelection="True"
             Skin="Default" DataSourceID="datosPedidos" AllowAutomaticUpdates="true" OnItemDataBound="rgControlPedidos_ItemDataBound">
            <MasterTableView ShowFooter="false" DataKeyNames="idPedido" EditMode="InPlace" CommandItemDisplay="TopAndBottom" ClientDataKeyNames="refPedido">
                <Columns>
                    <telerik:GridBoundColumn DataField="refPedido" HeaderText="Número de Referencia" ReadOnly="true"/>
                    <telerik:GridBoundColumn DataField="numCliente" HeaderText="Número de Cliente" ReadOnly="true"/>
                    <telerik:GridTemplateColumn  HeaderText="Status">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem,"Status") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadDropDownList ID="ddlStatus" runat="server" DataSourceID="datosStatus" DataTextField="Status"
                                DataValueField="idStatus" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.idStatus")%>'></telerik:RadDropDownList>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="fechaPedido" HeaderText="Fecha del Pedido" ReadOnly="true"/>
                    <telerik:GridEditCommandColumn UniqueName="ColumnaEditar" HeaderText="Editar" UpdateText="Guardar" CancelText="Cancelar" >
 
                    </telerik:GridEditCommandColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

 

This is the code of SqlDataSource:

<asp:SqlDataSource ID="datosStatus" runat="server"></asp:SqlDataSource>
 
 
 
    <asp:SqlDataSource ID="datosPedidos" runat="server" UpdateCommand="UPDATE DV_CAT_PEDIDOS SET idStatus = @idStatus  where refPedido=@refPedido">
        <UpdateParameters>
            <asp:Parameter Name="idStatus" Type="Int32" />
            <asp:Parameter Name="refPedido" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>

 

And this code is in CodeBehind:

string con = ConfigurationManager.AppSettings["ConeccionBD"].ToString();
            datosStatus.ConnectionString = con;
            datosStatus.SelectCommand = "SELECT idStatus,Status FROM DV_CAT_STATUS";
 
            datosPedidos.ConnectionString = con;
            datosPedidos.SelectCommand = "select pedidos.idPedido, pedidos.refPedido , pedidos.numCliente, " +
                "pedidos.fechaPedido , status.Status, status.idStatus " +
                "from DV_CAT_PEDIDOS pedidos " +
                "JOIN DV_CAT_STATUS status ON status.idStatus=pedidos.idStatus "+
                "ORDER BY pedidos.idPedido desc";

 

Daniel
Top achievements
Rank 1
 asked on 31 Jan 2017
1 answer
175 views

I have a .NET 4.5 webforms site that uses a mixture of Telerik AJAX Tools and ASP.NET AJAX tools.  Separately these tools work fine, but I have one page that has a RadTabStrip, RadMultiPage items, and RadGrids, along with an ASP.NET UpdatePanel with some ModalPopupExtender controls.  Now, in my local dev environment and my staging environment, this page works as intended.  In my grid, I have a link on each row that, when clicked, opens a modal popup.  However, when I move this to our production web server, the popups don't render and I get the following error returned:

SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404

Telerik.Web.UI.WebResource.axd (15,16485)

 

Not sure what is wrong, as both staging and production environments are the same.  Here is the markup for the page that is having trouble:

001.<%@ Page Title="" Language="C#" MasterPageFile="~/Suppliers/Suppliers.Master" AutoEventWireup="true" CodeBehind="BidBoard.aspx.cs" Inherits="Preferred_Vendor_Site.Suppliers.BidBoard" %>
002. 
003.<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
004.<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
005.</asp:Content>
006.<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
007.    <%--<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>--%>
008.    <telerik:RadScriptBlock ID="radSriptBlock" runat="server">
009.        <script type="text/javascript">
010.            function bidOnProject(rfbID) {
011.                //save the rfbID
012.                $("#<%= hfRFBID.ClientID%>").val(rfbID);
013.                //load the rfb
014.                $("#<%= btnLoadRFBforBid.ClientID%>").trigger('click');
015.            }
016. 
017.            function viewBid(bidID) {
018.                //save the bidID
019.                $("#<%= hfBidID.ClientID%>").val(bidID);
020.                //load bid information
021.                $("#<%= btnLoadViewBid.ClientID%>").trigger('click');
022.            }
023. 
024.            function showAlert(message) {
025.                alert(message);
026.            }
027.        </script>
028.    </telerik:RadScriptBlock>
029.    <div class="container">
030.        <div class="row">
031.            <div class="col-lg-12">
032.                <telerik:RadAjaxManager ID="ramAjaxManager" runat="server" UpdateInitiatorPanelsOnly="True" OnAjaxRequest="ramAjaxManager_AjaxRequest">
033.                    <AjaxSettings>
034.                        <telerik:AjaxSetting AjaxControlID="rmpBidMultiPage">
035.                            <UpdatedControls>
036.                                <telerik:AjaxUpdatedControl ControlID="rmpBidMultiPage" />
037.                            </UpdatedControls>
038.                             
039.                        </telerik:AjaxSetting>
040.                        
041.                        <telerik:AjaxSetting AjaxControlID="btnLoadRFBforBid">
042.                             
043.                        </telerik:AjaxSetting>
044.                        <telerik:AjaxSetting AjaxControlID="btnLoadViewBid" />
045.                    </AjaxSettings>
046.                </telerik:RadAjaxManager>
047.                <telerik:RadTabStrip RenderMode="Lightweight" ID="rtsBidTabs" runat="server" MultiPageID="rmpBidMultiPage" AutoPostBack="false">
048.                    <Tabs>
049.                        <telerik:RadTab PageViewID="rpvOpenRFBs" Text="Open Request for Bids" />
050.                        <telerik:RadTab PageViewID="rpvMyProjects" Text="Bidding History" />
051.                        <telerik:RadTab PageViewID="rpvAwarded" Text="Awarded Projects" />
052.                    </Tabs>
053.                </telerik:RadTabStrip>
054.                <telerik:RadMultiPage ID="rmpBidMultiPage" runat="server">
055.                    <telerik:RadPageView ID="rpvOpenRFBs" runat="server" Selected="true">
056.                        <h3>Open Requests for Bids</h3>
057.                        <p>
058.                            The following Requests for Bids are open for your company to bid on.  To bid on a project, click on the "Bid on Project" link.
059.                        </p>
060.                        <telerik:RadGrid ID="rgOpenRFBs" runat="server" AllowPaging="true" PageSize="5" AllowSorting="true" GridLines="Horizontal" OnNeedDataSource="rgOpenRFBs_NeedDataSource"
061.                            AutoGenerateColumns="false">
062.                            <MasterTableView>
063.                                <Columns>
064.                                    <telerik:GridBoundColumn DataField="viewRFB" DataType="System.String" HtmlEncode="false" />
065.                                    <telerik:GridBoundColumn DataField="Project Department" HeaderText="Project Department" DataType="System.String" />
066.                                    <telerik:GridBoundColumn DataField="Project Description" HeaderText="Project Description" DataType ="System.String" />
067.                                    <telerik:GridBoundColumn DataField="Start Date" HeaderText="Start Date" DataType ="System.String" />
068.                                    <telerik:GridBoundColumn DataField="End Date" HeaderText="End Date" DataType ="System.String" />
069.                                </Columns>
070.                            </MasterTableView>
071.                            <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
072.                        </telerik:RadGrid>
073.                    </telerik:RadPageView>
074.                    <telerik:RadPageView ID="rpvMyProjects" runat="server">
075.                        <div id="MyProjects" style="margin-bottom: 25px;">
076.                            <h3>Pending Bids</h3>
077.                            <p>
078.                                The following is a list of projects your company has bidded on but have not been awarded. 
079.                            </p>
080.                         
081.                            <telerik:RadGrid ID="rgMyProjects" runat="server" AllowPaging="true" PageSize="5" AllowSorting="true" GridLines="Horizontal" AutoGenerateColumns="false" OnNeedDataSource="rgMyProjects_NeedDataSource"
082.                                 OnItemDataBound="rgMyProjects_ItemDataBound">
083.                                <MasterTableView>
084.                                    <Columns>
085.                                        <telerik:GridBoundColumn DataField="viewBid" DataType ="System.String" HtmlEncode="false" />
086.                                        <telerik:GridBoundColumn DataField ="Project Department" HeaderText ="Project Department" DataType="System.String" />
087.                                        <telerik:GridBoundColumn DataField="Project Description" HeaderText="Project Description" DataType ="System.String" />
088.                                        <telerik:GridBoundColumn DataField="Status" HeaderText="Bid Status" DataType="System.String" />
089.                                        <telerik:GridBoundColumn DataField ="Start Date" HeaderText ="Bidding Start" DataType ="System.String" />
090.                                        <telerik:GridBoundColumn DataField ="End Date" HeaderText ="Bidding End" DataType="System.String" />
091.                                        <telerik:GridBoundColumn DataField ="Bid Date" HeaderText ="Bid Date" DataType="System.String" />
092.                                    </Columns>
093.                                </MasterTableView>
094.                                <ClientSettings EnableRowHoverStyle="true" />
095.                            </telerik:RadGrid>
096.                        </div>
097.                        <div id="projectsLost">
098.                            <h3>Projects Not Awarded</h3>
099.                            <p>
100.                                The following is a listing of projects that your company placed a bid on but were not awarded.
101.                            </p>
102.                            <telerik:RadGrid ID="rgProjectsLost" runat="server" AllowPaging="true" PageSize="5" AllowSorting="true" GridLines="Horizontal" AutoGenerateColumns="false" OnNeedDataSource="rgProjectsLost_NeedDataSource"
103.                                 >
104.                                <MasterTableView>
105.                                    <Columns>
106.                                        <telerik:GridBoundColumn DataField="viewBid" DataType ="System.String" HtmlEncode="false" />
107.                                        <telerik:GridBoundColumn DataField ="Project Department" HeaderText ="Project Department" DataType="System.String" />
108.                                        <telerik:GridBoundColumn DataField="Project Description" HeaderText="Project Description" DataType ="System.String" />
109.                                        <telerik:GridBoundColumn DataField ="Start Date" HeaderText ="Bidding Start" DataType ="System.String" />
110.                                        <telerik:GridBoundColumn DataField ="End Date" HeaderText ="Bidding End" DataType="System.String" />
111.                                        <telerik:GridBoundColumn DataField ="Bid Date" HeaderText ="Bid Date" DataType="System.String" />
112.                                        <telerik:GridBoundColumn DataField="Award Date" HeaderText="Award Date" DataType="System.String" />
113.                                    </Columns>
114.                                </MasterTableView>
115.                                <ClientSettings EnableRowHoverStyle="true" />
116.                            </telerik:RadGrid>
117.                        </div>
118.                    </telerik:RadPageView>
119.                    <telerik:RadPageView ID="rpvAwarded" runat="server">
120.                        <h3>Projects Awarded</h3>
121.                        <p>
122.                            The following is a listing of projects your company was awarded.
123.                        </p>
124.                        <telerik:RadGrid ID="rgProjectsAwarded" runat="server" AllowPaging="true" PageSize="5" AllowSorting="true" GridLines="Horizontal" AutoGenerateColumns="false" OnNeedDataSource="rgProjectsAwarded_NeedDataSource">
125.                            <ClientSettings EnablePostBackOnRowClick="true" />
126.                            <MasterTableView>
127.                                <Columns>
128.                                    <telerik:GridBoundColumn DataField="viewBid" DataType ="System.String" HtmlEncode="false" />
129.                                        <telerik:GridBoundColumn DataField ="Project Department" HeaderText ="Project Department" DataType="System.String" />
130.                                        <telerik:GridBoundColumn DataField="Project Description" HeaderText="Project Description" DataType ="System.String" />
131.                                        <telerik:GridBoundColumn DataField ="Bid Date" HeaderText ="Bid Date" DataType="System.String" />
132.                                        <telerik:GridBoundColumn DataField="Award Date" HeaderText="Award Date" DataType="System.String" />
133.                                </Columns>
134.                            </MasterTableView>
135.                        </telerik:RadGrid>
136.                    </telerik:RadPageView>
137.                </telerik:RadMultiPage
138.            </div>
139.        </div>
140.    </div>
141.    <asp:UpdatePanel ID="upModals" runat="server">
142.        <ContentTemplate>
143.            <ajaxToolkit:ModalPopupExtender ID="mpxBidOnRFB" runat="server" BackgroundCssClass="modalBackground" DropShadow="true" TargetControlID="btnShowBidModal"
144.                            PopupControlID="pBidOnRFB" CancelControlID="btnCancelBid" />
145.                        <asp:Panel ID="pBidOnRFB" runat="server" style ="display:none;" CssClass="modalPanel">
146.                            <div id="bidOnRFB" class="bidModal">
147.                                <asp:HiddenField ID="hfRFBID" runat="server" />
148.                                <h2>Bid on this Project</h2>
149.                                <p>
150.                                    Please review the project listed in this RFB and place your bid below:
151.                                </p>
152.                                <dl>
153.                                    <dt>
154.                                        <span id="bidOnRFBDepart" runat="server" />
155.                                    </dt>
156.                                    <dd>
157.                                        <h3>Project Description</h3>
158.                                        <div id="bidOnRFBDescpt" runat="server" style="margin-bottom: 10px;"/>
159.                                    </dd>
160.                                    <dd>
161.                                        <strong>Start Date:</strong>  <span id="bidOnRFBStart" runat="server" />
162.                                    </dd>
163.                                    <dd>
164.                                        <strong>End Date:</strong>  <span id="bidOnRFBEnd" runat="server" />
165.                                    </dd>
166.                                    <dd>
167.                                        My Bid Amount:  $<asp:TextBox ID="txtBidOnRFBAmount" runat="server" />
168.                                    </dd>
169.                                </dl>
170. 
171.                                <asp:Button ID="btnSubmitBid" runat="server" Text ="Submit Bid" OnClick="btnSubmitBid_Click"/>
172.                                <asp:Button ID="btnCancelBid" runat="server" Text="Cancel" />
173.                            </div>
174.                        </asp:Panel>
175.                        <asp:Button ID="btnLoadRFBforBid" runat="server" style ="display:none;" OnClick="btnLoadRFBforBid_Click" />
176. 
177.                        <ajaxToolkit:ModalPopupExtender ID="mpxViewBid" runat="server" BackgroundCssClass="modalBackground" DropShadow="true" TargetControlID="btnShowViewBidModal"
178.                            PopupControlID="pViewBid" CancelControlID="btnCloseViewBid" />
179.                        <asp:Panel ID="pViewBid" runat="server" style ="display:none; min-width:50%;" CssClass="modalPanel">
180.                            <asp:HiddenField ID="hfBidID" runat="server" />
181.                            <div id="viewBid" class="bidModal">
182.                                <h2>View Bid</h2>
183.                                <dl>
184.                                    <dt>
185.                                        <span id="vwBidProjectDepart" runat="server" />
186.                                    </dt>
187.                                    <dd>
188.                                        <h3>Project Description:</h3>
189.                                        <div id="vwBidProjectDescript" runat="server" style="margin-bottom: 10px;" />
190.                                    </dd>
191.                                    <dd>
192.                                        <strong>Bid Amount:</strong>  <span id="vwBidAmount" runat="server" />
193.                                    </dd>
194.                                    <dd>
195.                                        <strong>Bidding Start Date:</strong>  <span id="vwBidRFBStartDate" runat="server" />
196.                                    </dd>
197.                                    <dd>
198.                                        <strong>Bidding End Date:</strong>  <span id="vwBidRFBEndDate" runat="server" />
199.                                    </dd>
200.                                    <dd>
201.                                        <strong>Project Awarded Date:</strong>  <span id="vwBidAwardDate" runat="server" />
202.                                    </dd>
203.                                </dl>
204. 
205.                                <asp:Button ID="btnCloseViewBid" runat="server" Text="Close" />
206.                            </div>
207.                        </asp:Panel>
208.                        <asp:Button ID="btnLoadViewBid" runat="server" style ="display:none;" OnClick="btnLoadViewBid_Click"/>
209.                        <asp:Button ID="btnShowViewBidModal" runat="server" style ="display:none;" />
210.                        <asp:Button ID="btnShowBidModal" runat="server" style ="display:none;"/>
211.        </ContentTemplate>
212.        <Triggers>
213.            <asp:AsyncPostBackTrigger ControlID="btnLoadViewBid" />
214.            <asp:AsyncPostBackTrigger ControlID="btnShowViewBidModal" />
215.            <asp:AsyncPostBackTrigger ControlID="btnShowBidModal" />
216.            <asp:AsyncPostBackTrigger ControlID="btnLoadRFBforBid" />
217.        </Triggers>
218.    </asp:UpdatePanel>
219.      
220.</asp:Content>

 

Is there something I'm missing, or could there be a setting on the web server that is causing the error to be thrown?

Marin Bratanov
Telerik team
 answered on 31 Jan 2017
5 answers
209 views
Hi Guys,

I have 2 RadComboBox in my asp page when I select values in any of these object it trigger selectedindexchanged handler for both combobox.

  These are my codes

<telerik:RadScriptManager runat="server" ID="RadScriptManager" />
<table>
<tr>
<td>Customer Set:</td>
<td>
    <telerik:RadComboBox ID="Radbox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
    Width="300" Height="200" AutoPostBack="True" OnSelectedIndexChanged="Radbox1_SelectedIndexChanged" /> 
 </td>
</tr>
<tr>
 <td>Event Set:</td>
<td>
     <telerik:RadComboBox ID="Radbox2" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
     Width="300" Height="200" AutoPostBack="True" OnSelectedIndexChanged="Radbox2_SelectedIndexChanged" /> 
</td>
</tr>

 Protected Sub Radbox1_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles Radbox1.SelectedIndexChanged
 
 End Sub
 
 Protected Sub Radbox2_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles Radbox2.SelectedIndexChanged
 
 End Sub

When I click on Radbox1 it  trigger both Radbox1 and Radbox2 handler.

Edit : I tried to put a asp dropdown along with these combo boxes and when I select these combo boxes handler of asp drop down is not triggering which made me think if it is anything to do with telerik handler.

Edit2: When I tried to set CheckBoxes="false" for Radbox2 then Radbox1 event handler  is only executed . 



Any Help much appreciated ,

Thanks,
Rahul
Balakrishna
Top achievements
Rank 1
 answered on 31 Jan 2017
1 answer
141 views

I am using VS 2013 and have the most current Telerik ASP.NET AJAX components loaded.

I have a single view I am accessing and I want to have three groups: Year > Month > Ingredient

I want all child columns under the Ingredient group to be collapsed by default.  I have tried to use the GroupsDefaultExpanded but it seems to collapse everything to the first group (Year).

ASPX code below:

<telerik:RadGrid ID="FutureViewGrid" OnColumnCreated="FutureViewGrid_ColumnCreated" ShowHeader="true" runat="server" SelectMethod="GetFuturesView" ItemType="RawPricing.DataModel.RawPricingFuturesView" AllowFilteringByColumn="True" AllowSorting="True" ShowGroupPanel="True">
                 
                                <ClientSettings Resizing-AllowColumnResize="true" Resizing-ResizeGridOnColumnResize="true" AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True" Resizing-AllowResizeToFit="true">
                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                </ClientSettings>
 
                <MasterTableView SelectMethod="GetFuturesView" GroupsDefaultExpanded="false" GroupLoadMode="Server" RetainExpandStateOnRebind="true" EnableGroupsExpandAll="true" >
 
                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="Year"  FieldAlias="Year"/>
                                <telerik:GridGroupByField FieldName="Cost_Change" FieldAlias="CostChange" Aggregate="Sum" FormatString="{0:c}" />
                                <telerik:GridGroupByField FieldName="Amount" FieldAlias="AmountLBS" Aggregate="Sum" FormatString="{0:#,##}" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Year" SortOrder="Ascending" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                         <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="Year"  FieldAlias="Year"/>
                                <telerik:GridGroupByField FieldName="Month" FieldAlias="Month" />
                                <telerik:GridGroupByField FieldName="Cost_Change" FieldAlias="CostChange" Aggregate="Sum" FormatString="{0:c}" />
                                <telerik:GridGroupByField FieldName="Amount" FieldAlias="AmountLBS" Aggregate="Sum" FormatString="{0:#,##}" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Month" SortOrder="Ascending" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="Year"  FieldAlias="Year"/>
                                <telerik:GridGroupByField FieldName="Month" FieldAlias="Month" />
                                <telerik:GridGroupByField FieldName="Ingredient" FieldAlias="Ingredient" />
                                <telerik:GridGroupByField FieldName="Cost_Change" FieldAlias="CostChange" Aggregate="Sum" FormatString="{0:c}" />
                                <telerik:GridGroupByField FieldName="Amount" FieldAlias="AmountLBS" Aggregate="Sum" FormatString="{0:#,##}" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Ingredient" SortOrder="Ascending" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                </MasterTableView>
            </telerik:RadGrid>
Konstantin Dikov
Telerik team
 answered on 31 Jan 2017
0 answers
65 views

Hi,

I got some issue with the autogenerated features :

I generated column dynamically with a StoredProcedure. 

1. Change the default DatePicker of autogenerated DateTimeColumn :

I'm able to change the columnEditor with a customEditor. But here it is already a RadDateTimeColumnEditor, I need to find how change the default picker(datePicker) with a DateTimePicker. 

protected void RadGridEdit_CreateColumnEditor(object sender, Telerik.Web.UI.GridCreateColumnEditorEventArgs e)
       {
           GridBoundColumn col = e.Column as GridBoundColumn;                       
           if (col != null && col.UniqueName!="Item" && Session["DataDef"]!=null)
           {
               DataSet ds = (DataSet)Session["DataDef"];
               DataRow[] drDeff = null;
               if (ds.Tables[0].AsEnumerable().Any(row => col.UniqueName == row.Field<String>("ListColumnNameFr")))
               {
                   drDeff = ds.Tables[0].Select("ListColumnNameFr='" + col.UniqueName + "'");
               }
               else
               {
                   drDeff = ds.Tables[0].Select("ListColumnNameFr='" + (col.UniqueName).Replace(" ", "") + "'");
               }
               if(drDeff.Length == 0) return;
               switch(drDeff[0][4] as string)
               {
                   case "DROPDOWN":
                       e.ColumnEditor = new CustomDropDownListEditor((ds.Tables[1].Select("ColumnKey='" + drDeff[0][1] + "'")).CopyToDataTable());
                       break;
                   default:
                       if (e.ColumnEditor is GridTextBoxColumnEditor)
                       {
                           GridTextBoxColumnEditor txt = e.ColumnEditor as GridTextBoxColumnEditor;
                           txt.TextBoxMode = TextBoxMode.MultiLine;
                       }
                       else if (e.ColumnEditor is GridDateTimeColumnEditor)
                       {                           
                           GridDateTimeColumnEditor gdtce = e.ColumnEditor as GridDateTimeColumnEditor;
                           gdtce.PickerControl.GetType();
                       }
 
                       break;
               }
           }
       }

 

2. Change autogenerated filters :
Where and when can I change it?

 

Thx,

Bouyez.

Bouyez
Top achievements
Rank 1
 asked on 31 Jan 2017
5 answers
290 views

Hi

im new in asp and telerik i want to know how to show the value of the gridBoundColumn that has the  employeeID and set it as default in the textbox of the GridBoundcolumn, so i want to know if its possible and if it is how to do it or a workaround

Thanks

Viktor Tachev
Telerik team
 answered on 31 Jan 2017
5 answers
126 views

HI all,

 

Im trying to change the maxvalue from a radnumericbox from codebehind.

the value changes depending the value of od a radcombobox, i having problem with that tried in selectindexchange and even on the radnumeric onload but nothing works any opinions how i can do this , from code behind.

 

Best Regards

Konstantin Dikov
Telerik team
 answered on 31 Jan 2017
2 answers
298 views
Hi,

As we are working on RAD DIAGRAM and we are trying to customise. Our requirement is to show the designed diagram even after zoom in and zoom out  but in the existing one once we zoom in and try to zoom out the designed diagram is going out of the RAD DIAGRAM window. So can you please suggest us to resolve this issue asap.

Thanks & Regards

Bhavya

Edited ShapesCollection

10 posts, 0 answers
  1. Hdereli
    Hdereli avatar
    1 posts
    Member since:
    Oct 2014

    Posted 17 Oct 2014 Link to this post

     Hi,

     RadDiagram is really nice component. I am trying to adapt this control to my project. After binding components using server-side methods, it worked fine. However I couldn't get edited shapes new properties (new title,X,Y). ShapesCollection has initial shapes. Is there any way that we can get the latest state of shapes at the server side.

     Thanks.
  2. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 22 Oct 2014 Link to this post

    Hello,

    The changes that you make on the RadDiagram control are saved only on the client, so it is expected that the ShapesCollection will have the initial shapes.

    There is an option for exporting the diagram data as shown in the following demo: http://demos.telerik.com/aspnet-ajax/diagram/examples/saveload/defaultcs.aspx. Nevertheless, currently it has a bug with getting the information for modified connections. You could use the following bug item in our feedback portal to track the status of the issue, vote for it and comment it: http://feedback.telerik.com/Project/108/Feedback/Details/139644

    Regards,
    Slav
    Telerik
  3. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 15 Dec 2016 in reply to Slav Link to this post

    Hi Slav,
    I am creating a raddigram as in this link "http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/functionality/shape-templates"
    but i am not using DiagramShape. i am able to get the data as shown in the picture pic1.
    later i am calling a function to check the value has been increased or not, if value increased i have to update the value. only value should be updated, i should not redraw whole shape. can i do that? if so how?
    Please help me in this context.
    in timer i am doing in this way but not able to update.
    aspx:
    <telerik:RadDiagram runat="server" ID="theDiagram" width="1330" RenderMode="Auto">
                            <ClientEvents OnClick="OnClick"  />
                            <ShapeDefaultsSettings Visual="ImageTemplate"></ShapeDefaultsSettings>
    </telerik:RadDiagram>
    ImageTemplate:
    function ImageTemplate(options) {
                       var dataviz = kendo.dataviz;
                        var group = new dataviz.diagram.Group({ autoSize: true });
                        var backGID = options.id;
                        if (backGID != "s1") {
                            group.append(new dataviz.diagram.Rectangle({
                                x: 0,
                                y: 0,
                                width: options.width,
                                height: options.height,
                                width: 195,
                                height: 75,
                                border_radius: 5,
                                background: "webkit-linear-gradient(top,  #bed2e2 0%,#abd3ee 94%,#d5ebfb 100%)",
                                fill: {
                                    color: "#bed2e2"

                                }
                            }));

                            var textWrap1 = options.content.substring(0, 12);
                            var textWrap2 = options.content.substring(12, 19);
                            group.append(new dataviz.diagram.TextBlock({
                                text: textWrap1,
                                color: "#000000",
                                x: 70,
                                y: 10
                            }));

                            if (textWrap2 != "") {
                                group.append(new dataviz.diagram.TextBlock({
                                    text: textWrap2,
                                    color: "#000000",
                                    x: 70,
                                    y: 25
                                }));
                            }


                            var img = options.content;
                            if (img.indexOf("ead") != -1) {
                                img = "../Images/Img_HeadCount.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                            }
                            else if (img.indexOf("oll") != -1) {
                                img = "../Images/Img_Rollcall.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                               
                            }
                            else {
                                img = "../Images/Img_Assembly_Point.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                            }
                            var image = new dataviz.diagram.Image({
                                source: img,
                                x: 5,
                                y: 5,
                                width: 60,
                                height: 60,
                            });
                            group.append(image);
                        }
                        else {
                            var jsonFilename = '<%=backImageUpload%>';
                            if (jsonFilename == null || jsonFilename == "") {
                                var imageFolder = "../backgroundImage/backgound.jpg";
                            }
                            else {
                                var imageFolder = "../backgroundImage/" + jsonFilename + ".jpg";
                            }

                            var wid = dataviz.DEFAULT_WIDTH;
                            var image = new dataviz.diagram.Image({
                                source: "../backgroundImage/" + options.content + ".jpg",
                                x: 10,
                                y: 7,
                                width: wid + 550,
                                height: 400 + 200,
                            });
                            group.append(image);
                        }
                        return group;
                    };
    timer function:
    function CountDownTimer() {
                        $.ajax({
                            type: "POST",
                            url: "Frm_MusteringMonitor.aspx/GetSessionValue",
                            contentType: "application/json;",
                            data: JSON.stringify(),
                            success: function (Data) {
                                if (Data.d != "") {
                               var diagramWidget1 = $find("<%= theDiagram.ClientID %>").kendoWidget;
                                    var listOfObject = JSON.parse(Data.d);
                                    var dectionaryItem = Data.d.replace(/[&\/\\#+()$~%.'"*?<>{}]/g, '');
                                    var getVal = dectionaryItem.split(',');
                                    var leng = diagramWidget1.shapes.length;
                                    var i = 1;
                                    for (i = 1; i < leng; i++) {
                                        var jsonObjName = getVal[i - 1].split(":");
                                        var DiaObjname = diagramWidget1.shapes[i].options.content;
                                        if (jsonObjName[0] === DiaObjname) {
                                            var NewValue = jsonObjName[1];
                                            diagramWidget1.shapes[i].options.Counter = NewValue ;
    // i have three shapes so doing loop here and i am able to get the value here but not updating on diagram
                                        }
                                    }
                                }
                               },
                               error: function (XMLHttpRequest, textStatus, errorThrown) {
                               }
                           });
                    }
    Thanks in advance.
  4. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 20 Dec 2016 Link to this post

    Hello Bhavya,

    You can redraw the visual of the shape to show the new value. I have attached a short sample that demonstrates this approach.

    Regards,
    Slav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 20 Dec 2016 in reply to Slav Link to this post

    Hi Slav,

    Thanks for the solution. it is working now without flickering.

  6. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan Link to this post

    Hi Slav,

    There is a function CountDownTimer(),which is in previous message

    How can i change the image ,In the Attached file i have highlighted the image.

  7. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan in reply to Bhavya Link to this post

    You can redraw the visual of the shape to show the new image. I have attached a short sample that demonstrates this approach.


    Regards,
    Slav 
    Telerik by Progress
  8. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan in reply to Slav Link to this post

    Hi Slav

    How Can i redraw the visual of the shape to show the New Image.methods are same as in previous msg(count down timer). I have attached a template ,where it should affect.

    Thanx in advance

  9. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 16 Jan Link to this post

    Hello Bhavya,

    You can create an Image object in the visual as shown in the following help article: http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/functionality/shape-templates

    Then you can pass the path of the new image via the options of the shape and redraw its visual similarly to how I update the content in my previous sample.

    Regards,
    Slav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 4 days and 3 hours ago in reply to Slav Link to this post

    Hi Slavs,

    Thank You For the Previous Solution,

    As we are working on RAD DIAGRAM and we are trying to customise. Our requirement is to show the designed diagram even after zoom in and zoom out  but in the existing one once we zoom in and try to zoom out the designed diagram is going out of the RAD DIAGRAM window. So can you please suggest us to resolve this issue asap.

    Thanks & Regards

    Bhavya

manjari
Top achievements
Rank 1
 answered on 31 Jan 2017
1 answer
79 views
When I add a Group using RadFilter, even when I select another operator (such as 'Or', 'Not And'  or 'Not Or'), the provider Result always shows 'And'.  I have verified that the ExpressionItem is a GroupExpression, and its GroupOperator is 'Or' when that is selected.  I can live with the display being in error, but I can't seem to access the GroupOperator = so that I can use it if that's the case.  Please advise- is this a bug?  Any actions or code to correct or at least access the values in the collection?  I have attached a screen shot showing the issue.
Milena
Telerik team
 answered on 31 Jan 2017
1 answer
213 views

Hi,

I have discovered an issue where the SelectedItem for a RadComboBox is null.

I use a System.Collections.Generic.IList to populate the RadComboBox.

When the IList has more than one item, then the RadComboBox works fine, and I can get the SelectedItem.

When the IList only has one item, then the RadComboBox has a SelectedItem of null.

Please see the attached to see how I populate the RadComboBox

Kinds regards,

Rob

 

Ivan Danchev
Telerik team
 answered on 31 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?