Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
121 views
get value in GridTemplateColumn control from another GridTemplateColumn control clickget value in GridTemplateColumn control from another GridTemplateColumn control clickget value in GridTemplateColumn control from another GridTemplateColumn control click
Yang
Top achievements
Rank 1
 answered on 17 Jul 2015
3 answers
116 views
I am using panel in RadToolTip. I have command button "btnOpen" on RadGrid. Whenever "btnOpen" is clicked it shows RadToolTip for specific row in RadGrid. Its all Working fine but not showing loading panel.
 
 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
 
            <AjaxSettings>
 
                <telerik:AjaxSetting AjaxControlID="btnOpen">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadToolTip1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
                <telerik:AjaxSetting AjaxControlID="rgCity">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadToolTip1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
        <telerik:RadToolTip ID="RadToolTip1" Animation="Slide" AnimationDuration="190" runat="server" Modal="true" HideEvent="ManualClose"
            Style="z-index: 6990" BackColor="White" Position="Center" Width="729px" Height="200px">
 
            <asp:Panel ID="Panel1" BackColor="Pink" runat="server" Height="190px">
           
 
 
                    <table align="center">
                        <tr>
                            <td>
                                <asp:Label ID="lbl_id" Text="City ID" runat="server"></asp:Label>
                                <asp:TextBox ID="Txt_id" runat="server"></asp:TextBox>
                            </td>
                             
                        </tr>
 
 
                        <tr>
                            <td>
                                <telerik:RadAsyncUpload runat="server" ID="FileUpload1" MultipleFileSelection="Disabled">
                                </telerik:RadAsyncUpload>
                            </td>
 
                        </tr>
 
 
                        <tr>
                            <td>
                                <telerik:RadButton runat="server" Skin="Silk" ID="BtnSubmit" Text="Upload files" OnClick="BtnSubmit_Click"></telerik:RadButton>
 
 
                                <asp:Label ID="lable_res" runat="server"></asp:Label>
                            </td>
 
 
                        </tr>
 
                    </table>
 
 
                    <%--<telerik:RadFormDecorator ID="rfd1" runat="server" DecoratedControls="all"></telerik:RadFormDecorator>--%>
            </asp:Panel>
        </telerik:RadToolTip>
Pavlina
Telerik team
 answered on 16 Jul 2015
3 answers
753 views

There is a RadComboBox (outside of RadGrid) and a RadGrid in my Web page.

When first time page loads, and user forgets to Select Item from RadComboBox (which is outside of RadGrid) and clicks on "Add New" button of RadGrid then this button should disable at that time and an alert should come ('Select item from RadComboBox first')

Now, when user select the item from RadComboBox, and then click on "Add New" button of RadGrid then it should perform "add" functionality //---this part is done

Below code is working fine only to disable the "Add New" button and show alert.

GridCommandItem cmditem = (GridCommandItem)RGGSTAcCode.MasterTableView.GetItems(GridItemType.CommandItem)[0];
            System.Web.UI.WebControls.Button ctrl = (System.Web.UI.WebControls.Button)cmditem.FindControl("AddNewRecordButton");
            ctrl.Enabled = false;
            ctrl.Attributes.Add("onClick", "test()");
 
            System.Web.UI.WebControls.LinkButton btn = (System.Web.UI.WebControls.LinkButton)cmditem.FindControl("InitInsertButton");
            btn.Enabled = false;
            btn.Attributes.Add("onClick", "test()");

But how to create this whole requirement using above code? Where to put this line of code, in which event, so that it should work as per need. 

Below is the whole HTML code I am using currently:

<telerik:RadComboBox ID="ddlCompany" runat="server" Height="200" Width="240"
          DropDownWidth="310" EmptyMessage="- Select Product -" HighlightTemplatedItems="true" CausesValidation="false"
          Filter="StartsWith" AppendDataBoundItems="true" AllowCustomText="true" AutoPostBack="true"
          DataTextField="Title" DataValueField="Code" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged">
        </telerik:RadComboBox>
 
        <br />
        <br />
 
                <telerik:RadGrid ID="RGGSTAcCode" runat="server"
                   ShowFooter="True" GroupingEnabled="False" ShowStatusBar="true" EmptyDataText="No record available."
                   AllowAutomaticInserts="False" AllowAutomaticUpdates="False" AllowAutomaticDeletes="true"
                   OnNeedDataSource="RGGSTAcCode_NeedDataSource" OnItemDataBound="RGGSTAcCode_ItemDataBound"
                   OnInsertCommand="RGGSTAcCode_InsertCommand" OnDeleteCommand="RGGSTAcCode_DeleteCommand"
                   OnUpdateCommand="RGGSTAcCode_UpdateCommand">
 
                  <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                  <mastertableview ShowHeadersWhenNoRecords="true" autogeneratecolumns="false" datakeynames="AccountCodeID" InsertItemDisplay="Top"
                    insertitempageindexaction="ShowItemOnCurrentPage" ShowFooter="True" CommandItemDisplay="Top">                                  
                         <Columns>
                             <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                                                           
                             <telerik:GridTemplateColumn UniqueName="AccountCode" HeaderText="Account Code">
                                <ItemTemplate>
                                  <asp:Label ID="lblAcCode" Text='<%# Eval("AccountCode") %>' runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                  <asp:DropDownList ID="ddlAcCode" DataTextField="AccountDescription" DataValueField="AccountCodeID" runat="server"/>
                                </EditItemTemplate>
                             </telerik:GridTemplateColumn>
 
                             <telerik:GridBoundColumn DataField="AccountDescription" HeaderText="Description" UniqueName="AccountDescription" SortExpression="AccountDescription" InsertVisiblityMode="AlwaysHidden" ReadOnly="true" ></telerik:GridBoundColumn>
                             <telerik:GridBoundColumn aggregate="SUM" DataField="Amount" HeaderText="Amount" FooterText="Total : " UniqueName="Amount" SortExpression="Amount"></telerik:GridBoundColumn>
                             <telerik:GridBoundColumn DataField="Remark" HeaderText="IFCA Remark" UniqueName="Remark" SortExpression="Remark">
                                  
                             </telerik:GridBoundColumn>   
                              
                             <telerik:GridButtonColumn ConfirmTextFormatString="Are you sure you want to Delete {0} Account Code?" ConfirmTextFields="AccountCodeID"
                             ConfirmDialogType="RadWindow" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"></telerik:GridButtonColumn>                                                                           
                      </Columns>
                      <EditFormSettings>
                       <EditColumn ButtonType="ImageButton" />
                      </EditFormSettings>
                      <CommandItemSettings AddNewRecordText="Add new record" RefreshText="Refresh"></CommandItemSettings>
                  </mastertableview>
                </telerik:RadGrid>

Please guide.

Please note that I am very new in Telerik controls so if I ask something very basic please forgive and try to guide me in a simple way.

Eyup
Telerik team
 answered on 16 Jul 2015
1 answer
122 views
I have written a javascript function that allows the enter key to navigate to the next input on a large form that I have and I would like the up & down arrow keys to have the same functionality, however I believe the built in arrow key increment settings in the RadNumericTextbox are interfering with this. I have set the InterceptArrowKeys setting to False and am trying to capture the entered key with the ClientEvents.OnKeyPress event but it is not firing. Any ideas on how to accomplish this?
Eyup
Telerik team
 answered on 16 Jul 2015
1 answer
80 views

How would I go about populating an HTMLChart with the selected row within my RadGrid?  Upon a user selecting a row, I need the points on the graph mapped accordingly.  Need the dates across the X axis and amounts going up the Y axis.

This example is what I want but not looking to query the database just use the records already returned.

 Appreciate your help.

 

Konstantin Dikov
Telerik team
 answered on 16 Jul 2015
12 answers
1.4K+ views
I've got a radGrid that allows paging.  I have a grid calculated column in the grid.  If user clicks on the next page or user changes the page size , the following error message displays:


Sys.WebForms.PageRequestManagerServerErrorException:  An item with the same key has already been added.

If we are commenting the grid calculated columns paging is working fine.

Thanks
Pavlina
Telerik team
 answered on 16 Jul 2015
1 answer
73 views

hi,

 

i have three Three RadGrid on same page  how we apply filter when i use on OnItemDataBound to fixed width of AutoGenerateColumns.

Actually problem is OnItemDataBound width of other two radgrid is change.

how to fixed any idea

 thanks,

 

Eyup
Telerik team
 answered on 16 Jul 2015
1 answer
59 views

Hi,

Let me describe the scenario.

I have a page with a treeview on the left side and a diagram (using a 3rd party tool) on the right.

The treeview is built in code behind and is not modified on the client.

The user right-clicks on a shape on the diagram and selects an item from a context menu.

This causes a radWindow to open.  When the user clicks on Save, a web service is called to update the database.

The window is closed and everything is fine.

However, if the user opens the radWindow and clicks Save four times (or more) and then clicks on a button to navigate to the next diagram, an error occurs:

System.ArgumentOutOfRangeException: Index was out of range

I have put a break in my code behind where the error is occurring and it appears that the treeview is suddenly empty - no nodes!!

There is nowhere in the scenario I presented above where the treeview is touched in any way, so I'm at a loss as to how it became empty.

Could this possibly be session related?  I'm not familiar enough with web services (using an asmx file) to know whether the web service could be affecting the same session storage that is used by the trreeview.

Is there any other reason that the treeview would suddenly be empty?

I can post code snippets, but I'm afraid that might be overwhelming for this forum.

Any ideas?  Suggestions for debugging?

Thanks in advance.

Jim

Bozhidar
Telerik team
 answered on 16 Jul 2015
19 answers
579 views
Is it possible to hide the expand/collapse arrow for certain RowFields?

Looking at the example, I want to disable and hide the expand/collapse button for that row where the value = "XXX"

Can i do this in the prerender event easily?
KARTHIK
Top achievements
Rank 1
 answered on 16 Jul 2015
1 answer
91 views

Hello,

 

Version: 2015.0001.0401.0045

When using batch edit, and changing a cell's value to a value containing a apostrophe/quote ( ' ) or 2, and pressing "Save Changes", the __doPostback function failed with error: Uncaught Syntax Error: missing ) after argument list.

The output of the function is like this:

__doPostBack('RadGrid_TimeReg','FireCommand:RadGrid_TimeReg$ctl00;BatchEdit;u(0,.,ProjectList,.,Jasper - Werk Order #0005 'Jasper' (52),.,TimeKindInfo,.,Ontvetten,.,);.;')

As you can see, 'Jasper' breaks the code.

I consider this a bug.

 

Kind regards,

Erik

Angel Petrov
Telerik team
 answered on 16 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?