Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
60 views
Hi there,  I'm adding a dynamic column at run-time, but when the user clicks the "new record" button, I don't want the new column to have the ability of having user input.

I know that if I was doing this at design-time, then I would just add empty  <EditItemTemplate></EditItemTemplate> tags.

So, at the moment - I'm building my column like this :

   'Add a new column showing the data from the attribute search box
        Dim objBoundColumn As New GridBoundColumn
        radgridContacts.MasterTableView.Columns.Add(objBoundColumn)         objBoundColumn.DataField = AttributeList.SelectedItem.Value         objBoundColumn.HeaderText = AttributeList.SelectedItem.Value         objBoundColumn.UniqueName = "tempColumn"

What I'd like to do is add something like :
objBoundColumn.EditItemTemplate = False 

Can anyone out there tell me how to do that please ?


Scott
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
134 views
Is this kind of "rendering" supported.

For eaxmple imagine tennis competition. Best way to see (that peaple are used to) is to display every contestant one below another (in most left column of chart). After 1st round winners will be populated in 2nd column (to the right of first one). That contonues to populate with every round until final match.

I attach picture as example.

Thank you.
Peter Filipov
Telerik team
 answered on 19 Jan 2012
1 answer
109 views
Hi,

Can you show me how to use RadProgressArea while loading data from a sql server?  Here is my scenario:

I have a RadButton.  when a user click on this button, I have a function call RetrieveData() and this function will connect to a sql database and query about 100,000 records and performing a lot of data manipulation so it will take awhile to produce desire data.

while processing the data, I would like to display like a progress bar so user can see what's going on and wait.  I found the demo here:
http://demos.telerik.com/aspnet-ajax/upload/examples/customprogress/defaultcs.aspx and really like it, but I don't know how to apply it to my scenario.  From the example, it sets the total process = 100, but in my case, my query run can take up to 3 minutes.  Please provide code as possible.  Here is my code behind page:

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Do not display SelectedFilesCount progress indicator.
            RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;
        }
  
        RadProgressArea1.Localization.Uploaded = "Total Progress";
        RadProgressArea1.Localization.UploadedFiles = "Progress";
        RadProgressArea1.Localization.CurrentFileName = "Please wait while updating database... ";
    }

protected void RetrieveData()
{
        //using LINQ to SQL to select data
}

private void UpdateProgressContext()
    {
  
        RadProgressContext progress = RadProgressContext.Current;
  
        const int total = 100;
  
        progress.Speed = "N/A";
        for (int i = 0; i < total; i++)
        {
            progress.PrimaryTotal = 1;
            progress.PrimaryValue = 1;
            progress.PrimaryPercent = 100;
  
            progress.SecondaryTotal = total;
            progress.SecondaryValue = i;
            progress.SecondaryPercent = i;
  
            progress.CurrentOperationText = "Step " + i.ToString();
  
            if (!Response.IsClientConnected)
            {
                //Cancel button was clicked or the browser was closed, so stop processing
                break;
            }
  
            progress.TimeEstimated = (total - i) * 100;
             
            //Stall the current thread for 0.1 seconds
            System.Threading.Thread.Sleep(50);
        }
    }

protected void RadButton1_Click(object sender, EventArgs e)
   {
       UpdateProgressContext(); //I assume this is how it call
       RetrieveData();
   }
Please help, thanks in advance!
Bozhidar
Telerik team
 answered on 19 Jan 2012
3 answers
255 views
I have a radButton in the groupfooter of a radGrid.  

I have set the OnClick to call the button click which is in ASP.  It is a delete button, so I wanted to confirm deletion before actually deleting.  The OnClientClicked does not fire.  For testing purposes, I even removed the OnClientClick  andOnClientClicked still does not fire.  Here is a snippet of my code:

<GroupFooterTemplate>
    <telerik:RadButton runat="server" ID="RadButton1" Text='<%# sDeleteButtonText %>' Value='<%# sCountryCode %>' OnClientClicked="if(!confirm('Are you sure you want delete this?')) return false;" >
    </telerik:RadButton>
</GroupFooterTemplate>

The OnClientClick, when it was in there, would go to this code:
Public Sub RadButton1_click(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim button As RadButton = sender
    SqlDataSource1.DeleteParameters.Item("CurrencyTarget_CountryCode").DefaultValue = button.Value
    SqlDataSource1.Delete()
    RadGrid1.MasterTableView.Rebind()
    RadGrid1.CurrentPageIndex = 0
End Sub


I am on Windows 7
I am using MS Visual Studio 2010
I have the latest RadControls v.2011.3.1305.35
Rick
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
97 views
Hi,

I have RadGrids in my project that use the InPlace edit mode, as well as a CommandItemTemplate that contains "Add New Record" and "Delete Selected Records" buttons displayed at the bottom.

The tabulation in the form goes:
1. Grid
2. Add New Record
3. Delete Selected Records
4. Row 1 Cell 1
5. Row 1 Cell 2
6. etc...

When I'm on the last cell of the last row, and I press tab, the focus goes outside of the grid.

Is it possible to change the tabulation so that it goes:

1. Grid
2. Row 1 Cell 1
3. Row 1 Cell 2
etc...
x. Last Row Last Cell
y. Add New Record
z. Delete Selected Records

Thank you.

PS: I tried the following, among a few other things, but there was no change:

protected void MyRadGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e != null)
            {
                if (e.Item.IsInEditMode)
                {
                    if (e.Item is GridHeaderItem)
                    {
                        e.Item.TabIndex = 1;
                    }
                    else if (e.Item is GridDataItem)
                    {
                        e.Item.TabIndex = 2;
                    }
                    else if (e.Item is GridFooterItem)
                    {
                        e.Item.TabIndex = 3;
                    }
                    else if (e.Item is GridCommandItem)
                    {
                        e.Item.TabIndex = 4;
                        GridCommandItem item = e.Item as GridCommandItem;
                        Button addNewRecord = (Button)item.FindControl("btnAddNewRecord");
                        Button deleteSelected = (Button)item.FindControl("btnDeletedSelected");
 
                        addNewRecord.TabIndex = 5;
                        deleteSelected.TabIndex = 6;
                    }
                }
            }

blablabla
Top achievements
Rank 1
 answered on 19 Jan 2012
4 answers
134 views
Hi,

I noticed that when I set the EnablePostBackOnRowClick property to true in the ClientSettings of the RadGrid, the client event OnCommand is not fired when the command is "RowClick". The server-side event is fired w/o any issues.

When the EnablePostBackOnRowClick property is set to false, OnCommand is fired fine on the client side when i click a row.

Is this a bug or is it intended behavior?

Thank you.
blablabla
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
128 views
Is it possible to instruct the RadAjaxManager to only update a Repeater control on its ItemCommand event. This does not seem to isolate the update to the repeater...

<telerik:AjaxSetting AjaxControlID="rptPromotionPages">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="rptPromotionPages" />
    </UpdatedControls>
</telerik:AjaxSetting>

Does anyone know how to accomplish this?

Duncan
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Jan 2012
1 answer
40 views
Hi,

My scheduler control is inside a user control, I am populating it from code behind using a custom class, now when calendar finishes populating data , I want to fire a javascript metod. Please let me know how to achieve this.
Ivana
Telerik team
 answered on 19 Jan 2012
1 answer
62 views
Hi Guys,

I was hoping you may be able to assist me in overriding your default styles. I have my own skin applied to a panel and everything works and looks as it should. There are a few discrepancies between browsers and to get around these I need to be able to amend the padding on .rpimage.

I have a class as follows to try and alter the padding:

.RadPanelBar_MySkin .rpImage
{
    padding-bottom: 10px !important;
}

However this is still being overridden by .RadPanelBar .rpImage. Is there a way that I can overide this and set the image padding myself?

Thanks as always for your help.
Kate
Telerik team
 answered on 19 Jan 2012
1 answer
54 views
Hi,
  I need small guidance in customizing select location during file upload. Is it possible to target a client location while pressing Select for uploading a file?
Case: There is a folder named vinoth in my client system. Whenever i login with my credential i have  to open that folder by default during upload file select in client so that i can easily pic files from my folder directly. Can you please let me know if this facility is available in Radupload control.

Thanks and Regards,
 VINOTH
Kate
Telerik team
 answered on 19 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?