Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
204 views

Hi,

We have Asp.net 4.5 and using Telerik WebUI version 2012.3.1308.45.
Using telerik:RadScriptManager as our main script manager.

Page is loading very slow and We got waiting for ajax.aspnetcdn.com.. message.

How can we create local fall back for JQuery and other JavaScript files required by ajax toolkit?


Best Regards,

Damodar

Dimitar Terziev
Telerik team
 answered on 09 Jul 2014
4 answers
344 views
Hello,

Is there a way to replicate the ClearCheckedItems() method on the client side for a radcombobox.

I am able the uncheck all check box using javascript, but if after I hit a button and code to the server code, the Checkbox are still considered checked. Also, if I clear the checked items using the javascript and select other items after, the counter will display a wrong
number of selected items

function radComboBoxLocationSelectedIndexChanged(item) {
  
resetRadComboboxWithCheckBox('<%=radComboBox1.ClientID %>');
  
}
  
function resetRadComboboxWithCheckBox(comboBoxClientId) {
  
var d = $find(comboBoxClientId);
  
d.set_text("");
  
d.clearSelection();
  
var items = d.get_items();
  
var itemsCount = items.get_count();
  
for (var itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
  
var item = items.getItem(itemIndex);
  
var chk = getItemCheckBox(item);
  
if (chk != null) {
  
chk.checked = false;
  
}
  
}
  
}
  
 
  
 
  
 
  
function getItemCheckBox(item) {
  
//Get the 'div' representing the current RadComboBox Item. 
  
var itemDiv = item.get_element();
  
//Get the collection of all 'input' elements in the 'div' (which are contained in the Item). 
  
var inputs = itemDiv.getElementsByTagName("input");
  
for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {
  
var input = inputs[inputIndex];
  
//Check the type of the current 'input' element. 
  
if (input.type == "checkbox") {
  
return input;
  
}
  
}
  
}


Any Ideas?

Thanks.
Gowtham
Top achievements
Rank 1
 answered on 09 Jul 2014
6 answers
282 views

I would like to use the file explorer to look at the files that I upload.  here is the issue I am running into.  I only wnat to show the files for a person that are part of that record.  So everyone has a record.  If they upload files I put the file names in the database along with the ID of person whom uploaded them.  Is there a way to only load the files in the file explorer that belong to that person whom uploaded them.  Right now I am trying to view them as links and not working so well.
So is there a way to fill the fileExplorer with just the files I am picking in the sql statement.

Current method not working so well as link buttons caus ethey so not persist well in radwindow.
 
  sql = "Select strUrl from PriorServiceUpload where intPriorServiceId = " & myDataTable.Rows(0)(0)
 
            myDataTable = New DataTable
            myDataTable = getReader(sql)
 
            If myDataTable.Rows.Count > 0 Then
                Dim attach As New LinkButton
 
                For Each row As DataRow In myDataTable.Rows
                    attach.Text = row(0) & "<br>"
                    attach.CausesValidation = False
                    attach.CommandArgument = row(0)
                Next
 
                AddHandler attach.Click, AddressOf GetattachLink
                phAttach.Controls.Add(attach)
            End If



Vessy
Telerik team
 answered on 09 Jul 2014
1 answer
175 views
I have a file explorer on my page that is filtering files based on a sql pull.  However what happens is that I use the async uploader to upload files then show in only grid view in the file explorer.  When I post back though nothing show in the file explorer, it says no files avialable even though I uploaded files or there where previous files in there.






Protected Sub lnkSubmitRequest_Click(sender As Object, e As EventArgs) Handles lnkSubmitRequest.Click
 
Code to submit the page
 
This statment reloads all the information on the page if its changed from the database
  LoadPriorService(Convert.ToInt32(HFRecruit.Value))
 End If
 
 
 Private Sub LoadRecruit(ByVal recruitId As Integer)
 
Reload the page
 
This statement is where the FileExplorer is located on the LoadPriorService but I have no command to actually reload the control on a postback.
  LoadPriorService(recruitId)
        Else
            ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "OpenWindow", "NoData();", True)
        End If
 
 
 
  Private Sub LoadPriorService(ByVal recruit As Integer)
        ClearPriorSvc()
 
        sql = "Select intPriorServiceId, intBranchServiceId, dtDischarge, bitSF180, bitStaterequest, bitArpercen, bitredd, strNotes, dtSubmitted, submittedBy, dtCompleted, CompletedBy, strRocComments " _
            & "from vw_PriorService where intRecruitId = " & recruit
 
        myDataTable = New DataTable
        myDataTable = getReader(sql)
 
        If myDataTable.Rows.Count > 0 Then
            HFPriorService.Value = myDataTable.Rows(0)(0)
            ddlBranchService.SelectedValue = myDataTable.Rows(0)(1)
            txtDtDischarge.Text = myDataTable.Rows(0)(2)
 
            If myDataTable.Rows(0)(3) = "1" Then
                cbSF180.Checked = True
            End If
 
            If myDataTable.Rows(0)(4) = "1" Then
                cbState.Checked = True
            End If
 
            If myDataTable.Rows(0)(5) = "1" Then
                cbArpercen.Checked = True
            End If
 
            If myDataTable.Rows(0)(6) = "1" Then
                cbREDD.Checked = True
            End If
 
            txtPriorNotes.Text = myDataTable.Rows(0)(7)
            lblSubmittedON.Text = myDataTable.Rows(0)(8)
            lblSubmittedBy.Text = myDataTable.Rows(0)(9)
            lblCompletedOn.Text = myDataTable.Rows(0)(10)
            lblCompletedBy.Text = myDataTable.Rows(0)(11)
            txtRocNotes.Text = myDataTable.Rows(0)(12)
            lnkSubmitRequest.Enabled = True
        Else
            lblSubmittedON.Text = "None Submitted"
            lblSubmittedBy.Text = "None Submitted"
        End If
    End Sub
 
 
Here is the code that loads the fileExplorer, it seems to only load on the initial page loads and bugs out on postback.
 
  Private Sub radFileExplorer_ExplorerPopulated(sender As Object, e As RadFileExplorerPopulatedEventArgs) Handles radExplorer.ExplorerPopulated
 
        'If HFPriorService.Value > "" Then
        sql = "Select strUrl from PriorServiceUpload where intPriorServiceId = " & HFPriorService.Value
 
        myDataTable = New DataTable
        myDataTable = getReader(sql)
 
        If myDataTable.Rows.Count > 0 Then
            If e.ControlName = "grid" Then
                Dim items As List(Of FileBrowserItem) = e.List
                Dim i As Integer = 0
                For Each row As DataRow In myDataTable.Rows
                    While i < items.Count
                        If Not items(i).Name.Contains(row(0)) Then
                            items.Remove(items(i))
                        Else
                            i += 1
                        End If
                    End While
                Next
            End If
        End If
        'End If
    End Sub
Vessy
Telerik team
 answered on 09 Jul 2014
3 answers
1.0K+ views
Hi,
One of RadGrids in my application is having large number of columns. TableLayout of MasterTableView is "Fixed".
I have explicitly set width for each column so that when all columns are made visible, they all are displayed correctly.
But by default only few columns are visible and they are automatically expanded to cover whole width of the grid.
I do not want some columns like checkbox columns to expand. I want them to be always of fixed width.
How can I achieve this??

I know this can be achieved by not specifying width of one of the columns, but then that column width reduces to 0 when more number of columns become visible.

Thanks
Tushar
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
620 views
Hello,

I added some three-state checkboxes like in the demo:

<telerik:RadButton ID="btnToggle" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton">
 <ToggleStates>
  <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleCheckbox" />
  <telerik:RadButtonToggleState Text="Filled" PrimaryIconCssClass="rbToggleCheckboxFilled" />
  <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleCheckboxChecked" />
 </ToggleStates>
</telerik:RadButton>

This works fine, but I want to disable the "Filled" state when clicking.
I want to set all three states server-side, but the user shouldn't be able to use the "Filled" state - he should be able to just switch between "unchecked" and "checked".

How can I achieve this?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
4 answers
122 views
I have a RadGrid which is bound to a stored Proc. There are columns in the stored proc that are not displayed in the grid, but I want to access their values.
For instance "IsNewProduct" is not displayed in the grid but I want to access its values when a row is selected.PLease let me know how to achieve this.
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
14 answers
397 views
Hi,
I am trying to visualize the fact that some dates are unavailable. I first tried to do this in Calendar_DayRender, but I was only able to disable the dates, not colorize them.

I then tried Calendar_PreRender, and added all unavailable dates (with formatting) into the calendars SpecialDays. What happened then was
1. still only disabled, no color.
2. when I go to next month, the backcolor appears. it then stays, and works ok.
3. ForeColor is never set. It seems that <span> overrides the styling. css for span is set by Telerik.

Any suggestions on how to fix this?
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
563 views
Hai All,

I am facing one problem in my website i am having one default.aspx page its not inheriting master page what i need when i open my site it will expire after 6mins for me whats happening for every pages its working fine every page is inheriting master page but this default.aspx is not inheriting master page so when i open default.aspx and doing something also its showing time out.so now i want to stop master page session time in this defult.aspx how to do.here i dont want to inherit master page and recreate bcz if i inherit master page so many issues will come so other than any solution is there plz tel me its urgent



Thanks  
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
271 views
Hello All,

I have activated Avg facility by applying Aggregate="Avg", which works fine but when the column is having no data then also avg counts that and calculates wrong avg.

for example

column1
$
$
$44
$44
$44
Avg: $26.40

Actually it should be $ 44

How to avoid blanks and How to achieve that?

Thank you!
Vishal
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?