Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views

Hi ,

 

I am using <telerik:GridDropDownColumn> inside radgrid of  aspnetAjax. I need to disable one column based on selection of item in GridDropDownColumn.

 

Is there a way to trigger event on selection change in GridDropDownColumn

 

I couldnt find right answer. can this be achieved? disabling one column inside radgrid based on selection of item inside dropdowncolumn in radgrid?

Regards,

Kiran

Attila Antal
Telerik team
 answered on 08 Mar 2023
0 answers
195 views

How do I save the image after I have made changes using  asp:button OnClick="xxx" (post back) to the database?

I have several controls (asp:Panel, asp:Label....) that I need to update after I change the image....

I'm reading my picture using OnImageLoading


    Protected Sub RadImageEditor1_ImageLoading(sender As Object, args As ImageEditorLoadingEventArgs)

        Dim MyConnection As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConn").ConnectionString)

        Dim MyCommand As New SqlCommand("select ID, imagedata from bildbank_data where ID = @ID;", MyConnection)

        MyCommand.Parameters.Add(New SqlParameter("@ID", SqlDbType.Int, 4))
        MyCommand.Parameters("@ID").Value = lblPickUpId.Text

        If MyConnection.State = ConnectionState.Closed Then
            MyConnection.Open()
        End If

        Dim dr1 As SqlDataReader = MyCommand.ExecuteReader
        If dr1.Read Then
            If Not dr1("imagedata") Is DBNull.Value Then
                Dim imagedata As Byte() = dr1("imagedata")
                Dim s As New MemoryStream(imagedata.ToArray())
                Dim img As New Telerik.Web.UI.ImageEditor.EditableImage(s)

                args.Image = img
                args.Cancel = True
            End If
        End If

        dr1.Close()

        MyCommand.Dispose()
        MyConnection.Close()

    End Sub

Kjell
Top achievements
Rank 1
Iron
Iron
 asked on 08 Mar 2023
1 answer
275 views

Iam using telerik grid of asp.net

I want to disable column "telerik:GridNumericColumn " in below code snippet on changing "telerik:GridDropDownColumn" I am not aware of how to handle selection change event of GridDropDownColumn on server side and make one column disabled.

Please help in this regard.

Regards, Kiran

 

Below is the radgrid declaration


<telerik:RadGrid ID="rg" runat="server"
                                                AllowSorting="False"
                                                AutoGenerateColumns="False" Width="730px" Height="263px"
                                                OnUpdateCommand="rg_Update"
                                                OnInsertCommand="rg_Insert"
                                                OnDeleteCommand="rg_Delete"
                                                OnItemCreated="rg_ItemCreated"
                                                OnItemCommand="rg_ItemCommand"
                                                OnSelectedIndexChanged="rg_SelectedIndexChanged"
                                                OnNeedDataSource="rg_NeedDataSource"
                                                OnDataBound="rg_DataBound"
                                                GridLines="None"
                                                CellSpacing="0"
                                                MasterTableView-Caption="Routing Rules">
                                                <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                                    <Selecting AllowRowSelect="True" />
                                                </ClientSettings>

                                                <MasterTableView CommandItemDisplay="Top" DataKeyNames="Id,IndexId">
                                                    <CommandItemSettings AddNewRecordText="Add New Routing Rule" />
                                                    <Columns>
                                                        <telerik:GridButtonColumn UniqueName="editButton" ButtonType="ImageButton" CommandName="Edit" FilterControlAltText="Filter editButton column"
                                                            HeaderText="Edit" HeaderStyle-Width="34px" ItemStyle-HorizontalAlign="Left" Resizable="false"
                                                            ImageUrl="~\Images\pencil.png">
                                                        </telerik:GridButtonColumn>
                                                        <telerik:GridButtonColumn UniqueName="deleteButton" ButtonType="ImageButton" CommandName="Delete" FilterControlAltText="Filter deleteButton column"
                                                            HeaderText="Delete" HeaderStyle-Width="47px" ItemStyle-HorizontalAlign="Left" Resizable="false"
                                                            ImageUrl="~\Images\delete.png"
                                                            ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?">
                                                        </telerik:GridButtonColumn>
                                                        <telerik:GridBoundColumn Visible="false" DataField="Id" UniqueName="RoutingRuleRuleId" ReadOnly="True" />
                                                        <telerik:GridNumericColumn DataField="Priority" UniqueName="RoutingRulePriority" HeaderText="Priority" DataType="System.Int32" MaxLength="3" />

                                                        <telerik:GridDropDownColumn
                                                            HeaderText="Rule Type" DataField="RoutingRuleDefinitionId" SortExpression="uRuleType" UniqueName="uRuleType"
                                                            ColumnEditorID="myRuleTypeDropDownEditor"
                                                            ListTextField="Name" ListValueField="Id" EnableEmptyListItem="True"
                                                            EmptyListItemValue="0" Visible="False">
                                                        </telerik:GridDropDownColumn>
</MasterTableView>
</telerik:RadGrid>

Doncho
Telerik team
 answered on 06 Mar 2023
9 answers
614 views
Hi friends,
       In my page i used radtreeview and binded this radtreeview dynamically with database. when i click on expand symbol (+) radtreeview  not expanding. when i click on root node (AF - Angel Falls) it's working fine. Root node expand not working at first time after that it's working fine.

Please find the screen shot of my radtreeview and please provide me the solution.


Thanks,
Nagendra.
Prof. Francisco Araújo
Top achievements
Rank 2
Iron
 updated answer on 04 Mar 2023
0 answers
515 views
Hi,
   We try to export date from rad grid to excel using following code(Rad Grid Export Code), if have small data no problem, but having 10000+ data getting too long like 20 to 30 minutes to wait. Here i share my code for export.
radgrdcount.ExportSettings.FileName = filename
radgrdcount.ExportSettings.IgnorePaging = True
radgrdcount.ExportSettings.ExportOnlyData = True
radgrdcount.ExportSettings.OpenInNewWindow = True
radgrdcount.MasterTableView.ExportToExcel()
Any way to speed up the process ? Please replay asap

Thanks
M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 updated question on 03 Mar 2023
1 answer
141 views

Hello telerik,

This is my first time using the telerik. I want to know how to add the following judgments in JavaScript or events. And also remove the image which does not fit the criteria at the same time.

For example, I need type in a text box '123' and upload an image called '123.jpg', then it is allowed to upload, because '123'='123'.But if I type in a text box '123' and upload an image called 'abc.jpg', it is not allowed to upload, because '123'<>'abc', then auto remove the image and reselect. how can I do it, please help me.

the following is my code.

 

<telerik:RadTextBox ID="txtContainer" runat="server" OnTextChanged ="txtContainer_TextChanged" AutoPostBack ="true" ></telerik:RadTextBox>

 <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="AsyncUpload1" AllowedFileExtensions="jpeg,jpg,gif,png,bmp" OnFileUploaded="RadAsyncUpload1_FileUploaded1" OnClientValidationFailed="onClientValidationFailed"  MaxFileInputsCount="1" >                    </telerik:RadAsyncUpload>

 

<script type="text/javascript">

function onClientValidationFailed(sender, args) {

              $telerik.$(".ruCancel").parent().remove();
              alert("Allowed files extension is jpeg,jpg,gif,png,bmp");
              sender.addFileInput();
          }

</script>

Rumen
Telerik team
 answered on 02 Mar 2023
0 answers
156 views
Telerik RadCombobox OnClientTemplateDataBound not fired when the web service returns no data. Is there any function or method to resolve this issue?
KBIY
Top achievements
Rank 1
 asked on 01 Mar 2023
9 answers
137 views
I have a combobox on my form with load on demand.

Simply putting that combo box on my page has turned a page that was pretty instantaneous to a page that takes five seconds to load.

If firefox it works like a champ.  In IE7, I get the five second delay.

Do you guys have an IE7 fix for this issue?

EDIT:  I meant IE7.  I can't change the post title...
Alan
Top achievements
Rank 1
Iron
 updated answer on 01 Mar 2023
1 answer
319 views

This is exactly what I need. But then I tried it.  Now my radgrid does not filter at all.  It is something in the prerender.. if I remove this.

Then filtering works again. Is there something that I am missing? It is like the preRender is canceling out my filter. I am using a needdatasource

 

https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/grid-save-and-restore-the-filters-automatically

     protected void grdProducts_PreRender(object sender, EventArgs e)
        {
            var grid = (RadGrid)sender;
            // If the flag is True
            if (IsFiltering)
            {
                // Save the Filters
                SaveFilters(grid);
                // Clear the Flag by setting its value to False
                IsFiltering = false;
            }

            // At initial Load (when not is a PostBack)
            if (!IsPostBack)
            {
                // Restore the Filters
                RestoreFilters(grid);
            }
        }


Mark
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 Feb 2023
15 answers
979 views
hi ,
  I am using rad controld for asp.net ajax and use radgrid for self reference heirarchy. All working nice.
But now i want to hide the built in collapse / expand button when not have child view in the row. How can i achive this?
Eldhose
Top achievements
Rank 1
Iron
 updated answer on 20 Feb 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?