Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
2.2K+ views
I used javascript debugger and did find an object to get the "checked" items in my RadComboBox.
what is the proper way to do this so I can clean up my code?
in my case I am getting the list of categories to send to RadScheduler provider

    window.OnClientAppointmentsPopulating = function (sender, eventArgs) {
        var combobox = $find("<%=ddlCatToShow.clientID %>");
        var list = "";
        var items = combobox.get_items();
        var array = combobox._checkedIndices.toString().split(','
        for (var i = 0; i < array.length-1; i++) { 
      
            var item = items.getItem(array[i]);
        //alert(item.get_text()); 
        //alert(item.get_value());   
            list += item.get_value() + ",";
        
        eventArgs.get_schedulerInfo().CategoryList = list.replace(/,\s*$/, "");
};


Vessy
Telerik team
 answered on 12 Apr 2021
4 answers
467 views
Hi,
I have a project where in a RadGrid the Master Table rows contain template columns that display totals based values in the Child detail table. The user is able to Update the Detail table rows which would affect the totals given in the parent row. However, when the user does update a record, the parent row doesn't update until I reload the page. How can I use the update event to also rebind the parent row?

I currently have a SQLDataSource object for each of the Parent and Child tables. Is there a relatively easy way to get the Parent Row to rebind on update since I shouldn't need to rebind all rows in the parent?

Currently, I have only written a RadGrid1_UpdateCommand and RadGrid1_ItemDataBound.

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) 
    //Get the GridEditableItem of the RadGrid      
    GridEditableItem editedItem = e.Item as GridEditableItem; 
 
    //Get the Primary Key associated with the edited row 
 
    //Get the Control Values for the associated rows 
 
    //Insert and update soem information in the database             
 
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    if (e.Item is GridDataItem && e.Item.OwnerTableView.DataSourceID == "SQLDataSourceParent"
    { 
         //Get the GridEditableItem of the RadGrid      
        GridDataItem dataItem = e.Item as GridDataItem; 
                 
        //Get the primary key value of the row using the DataKeyValue.      
                 
        //Set the Template Column values based on database records 
    } 

Attila Antal
Telerik team
 answered on 12 Apr 2021
3 answers
165 views

I have a product in asp.net web forms which has 6000+ plus clients with differant databases.

I stored raddock state of user controls in database. now i want to convert my application to mvc. so now how could i load this state in mvc . user controls treated as partial view

Vessy
Telerik team
 answered on 12 Apr 2021
1 answer
410 views

     So here is the button code

<div class="row mb-3">
        <div class="col-lg-6">
           <div class="form-inline">
                <telerik:RadButton ID="btnRunAudits" runat="server" SingleClick="true" OnClick="btnRunAudits_Click" CssClass="btn btn-info mr-3">
                    <ContentTemplate>
                        <i class="fal fa-long-arrow-right"></i>Execute System Edits
                    </ContentTemplate>
                </telerik:RadButton>     
                <telerik:RadLabel ID="lblExecuteAuditHistory" runat="server" CssClass="time-stamp" Visible="false"></telerik:RadLabel>
           </div>
        </div>
        <div class="col-lg-6 text-right">
            <telerik:RadButton ID="btnExport" runat="server" OnClientClicking="btnExport_onClientClicking" OnClick="btnExport_Click" CssClass="btn btn-info">
                <ContentTemplate>
                    <i class="fal fa-file-export"></i>Export Option(s)
                </ContentTemplate>
            </telerik:RadButton>
            <telerik:RadButton ID="btnRefreshErrors" runat="server" OnClick="btnRefreshErrors_Click" CssClass="btn btn-refresh" SingleClick="true" Width="100">
                <ContentTemplate>
                    <i class="far fa-sync"></i> Refresh
                </ContentTemplate>
            </telerik:RadButton>
        </div>
    </div>

Here is what normally works but does not:

protected void btnRunAudits_Click(object sender, EventArgs e)
        {
            // CLF - the button should be disabled if you can't click.  But just in case!
            if (util.Db.GetUBUserAssign(ubid) == util.appUserId && IsValidEdit(util.Db.GetUBStatusByUBID(ubid).ToString()))
            {
                btnExport.Enabled = false;  <==========
                btnRefreshErrors.Enabled = false; <=========

                //util.Db.RunUBAuditsBC(ubid);
                BuildExceptionGrid();
                if (gItemizedParsing.Items.Count > 0)
                {
                    plcTraining.Visible = true;
                }
                else
                {
                    Session["UBAuditOpen" + ubid.ToString()] = "T";
                    Response.Redirect("~/ubEditor.aspx?SysID=" + ubid.ToString(), false);
                }
                //add entry into audit history table
                util.Db.SaveLastExecuteInfo(ubid, util.appUserId);
                lbItemsRemaining.Text = util.Db.GetPotentialItemsRemaining(ubid);
                DataTable dt = util.Db.GetLastExecuteInfo(ubid);
                if (dt.Rows.Count > 0)
                {                 
                    lblExecuteAuditHistory.Visible = true;
                    lblExecuteAuditHistory.Text = "Last Executed by " + dt.Rows[0]["displayNm"].ToString() + " at " + dt.Rows[0]["dateup"].ToString();
                }

                btnExport.Visible = true;
                btnRefreshErrors.Visible = true;
            }
            else
            {
                btnRunAudits.Enabled = false;
            }            
        }

I have verified it is hitting the code above noted with <========

Basically when they press the btnRunAudits button i want btnExport and btnRefreshErrors disabled until btnRunAudits is done.

HELP :)

Vessy
Telerik team
 answered on 09 Apr 2021
3 answers
1.2K+ views

I have a RadGrid that I want to show a Font Awesome icon as a button. The column is set as a GridButtonColumn ButtonType="FontIconButton" with the button css class set. When the CommandName is blank the icon shows. When I assign the value CommandName="GetvCard" the grid shows the text "GetvCard" and not the icon. I don't have any code attached to the button yet as I was testing the UI only. Full grid markup:

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" DataSourceID="ObjectDataSource1" AllowFilteringByColumn="true" EnableLinqExpressions="false">
<MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
<Columns>
<telerik:GridButtonColumn ButtonType="FontIconButton" ButtonCssClass="fad fa-address-card xgrid blue" CommandName="GetvCard" UniqueName="GetvCard" CommandArgument="GetvCard">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="MYNAME" FilterControlAltText="Filter MYNAME column" HeaderText="Name" ReadOnly="True" SortExpression="MYNAME" UniqueName="MYNAME">
<FilterTemplate>
<telerik:RadTextBox ID="RadTextBox1" runat="server" ClientEvents-OnBlur="NameSearch" EmptyMessage="Name Search"></telerik:RadTextBox>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function NameSearch(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");

var mystring = sender.get_value();
tableView.filter("MYNAME", mystring, "Contains");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DSCRIPTN" AllowFiltering="false" FilterControlAltText="Filter DSCRIPTN column" HeaderText="Title" SortExpression="DSCRIPTN" UniqueName="DSCRIPTN">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EXTENSION" AllowFiltering="false" FilterControlAltText="Filter EXTENSION column" HeaderText="Extension" ReadOnly="True" SortExpression="EXTENSION" UniqueName="EXTENSION">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CELLNO" AllowFiltering="false" FilterControlAltText="Filter CELLNO column" HeaderText="Mobile No." ReadOnly="True" SortExpression="CELLNO" UniqueName="CELLNO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="INET1" AllowFiltering="false" FilterControlAltText="Filter INET1 column" HeaderText="Email" SortExpression="INET1" UniqueName="INET1">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

Am I missing something?

Scott


Doncho
Telerik team
 answered on 08 Apr 2021
2 answers
164 views

Is it possible to rebind the tasks from client side?

Also to close the appointment-tooltip?

Steve
Top achievements
Rank 1
Veteran
 answered on 07 Apr 2021
7 answers
450 views

Hello

I am working with a line chart and currently I can only set the same type of marker for each data point as the blue line, but I need to set a different type of markers for each data point as the red line. How can I do it?

 

Vessy
Telerik team
 answered on 07 Apr 2021
5 answers
283 views

Dear Support Team and Community,

I have a trouble with the expansion of image properties in the ImageManager.

I would like to add more properties (eg. data-pre, data-post) beside the Telerik's default properties (Alt Text, Long Description, etc...).

Furthermore, I also would like to add the mentioned properties into the panel when I right click on the inserted image in the content of the RadEditor.

Would you help me to solve this problem or send me the relevant references or tutorials.

Thank you so much.

Best regards,

VoVo

Rumen
Telerik team
 answered on 06 Apr 2021
4 answers
200 views

Hi,

we have a solution where users can mark locations to architectual drawings simply by clicking the location on the drawing.

Everything works fine with desktop browsers, but not with an Android devices. The problem with Android is that does not get X and Y cordinates.

Click event is fired even with an Adroid but no cordinates.

Please see sample script below:

 

   <script type="text/javascript">
                var imageEditor;

                function onImageLoad(sender, args) {
                    imageEditor = sender;

                    $telerik.$(imageEditor.get_viewport()).on("click", function (e) {
                        var statusBar = imageEditor._statusBar;
                        var posX = statusBar.get_coorX().innerText;
                        var posY = statusBar.get_coorY().innerText;

         
                    })



                }
        </script>

 

Vessy
Telerik team
 answered on 05 Apr 2021
9 answers
449 views
So it seems that I've come into a poorly documented set of ASP.NET solutions that collectively include references to several Telerik DLL's.  I have been tasked with evaluating how easy it would be to upgrade to the latest version of Telerik's ASP.NET for AJAX controls, but I currently am unsure where we are in terms of versions.

I found the following:

radeditor.net2.dll version 7.2.0.0
telerik.web.ui.dll version 2008.2.826.20
telerik.web.ui.dll version 2009.2.826.35
telerik.web.design.dll version 2009.2.826.35

So, basically, I'm evaluating whether or not we can take everything that references one or more of these dll's and upgrade them to the latest Telerik for ASP.NET AJAX.  Obviously this will have to be tested, but I need to give a report indicating what likely hurdles we are going to face.  If possible, I'd like to get all of the solutions using a single version, the latest.
Vessy
Telerik team
 answered on 05 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?