Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
Hello all,

I have a require for some custom functionality, and I think the RadGrid will work for me based on the examples, however I'm not sure how start coding or setting it up. Below is a brief example of the functionality and layout...

//Initial Row State
[Read Only Label] [Empty Textbox] [ Default Dropdown] [ Default Dropdown] [Add Button]

When the [Add Button] is clicked, I'd like to take the values entered for the textbox and two dropdown menues, and "push" them down. At that point, the top row will be blank, and the bottom row will have the delete button like this.

//After item is added
[Read Only Label] [Empty Textbox] [Default Dropdown] [Default Dropdown] [Add Button]
[Read Only Label] [New Text Value] [New Dropdown Choice] [New Dropdown Choice] [Delete]

As mentioned, the examples give the add/delete functionality, but not in this manner. I'm not actually pulling data from anywhere, it would be more like a data entry form. I can't figure out how to keep the add button at the top and push the top row down when the add button is clicked. Thanks  for any suggestions, examples etc..

-Chris
Richard
Top achievements
Rank 1
 answered on 19 Jan 2012
2 answers
178 views
Hi,

Can you please tell how I can remove the 'Upload' option from the right click context menu in the FileExplorer control?

Thank you very much!

Kind regards,
Randy Sullivan
Randy
Top achievements
Rank 1
 answered on 19 Jan 2012
5 answers
148 views
Hello there,
I have a listbox inside a RadToolBar as below I want to do something only if the user confirms to do it, otherwise I want to just cancel.

What I need (Is there an example for this?):
1. Ideally I would like to use a RadWindow.Confirm to get a response and process based on Confirm or Cancel (popup using client script only).
2. I don't want a postback to happen if the user selects cancel on the popup.

(with the below code the postback happens even if args.set_cancel(result) and result is the Cancel response from the window.confirm) Is it because one of the container of the listbox is causing the postback?

Can you please help?

        <telerik:RadToolBar runat="server" ID="RadToolBar1" Width="100%" Skin="Windows7">
            <Items>
                <telerik:RadToolBarDropDown ImageUrl="~/app_themes/default/images/Check.png">
                    <Buttons>
                        <telerik:RadToolBarButton>
                            <ItemTemplate>
                                <telerik:RadListBox runat="server" ID="lbDoSomething" Skin="Windows7" SelectionMode="Single"
                                    OnClientSelectedIndexChanging="ConfirmDo" OnSelectedIndexChanged="lbDoSomething_OnSelectedIndexChanged"
                                    AutoPostBack="True" />
                            </ItemTemplate>
                        </telerik:RadToolBarButton>
                    </Buttons>
                </telerik:RadToolBarDropDown>
            </Items>
        </telerik:RadToolBar>
 
 
 <script type="text/javascript">
....
        function ConfirmOverride(sender, args) {
            var msg = "Are you sure you want to do something?";
            var result = !window.confirm(msg);
            args.set_cancel(result);
 
        }
</script>

Thank you,
Manas
Manas
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
100 views
Title says it all really. Enquiring minds need to know. -- Stuart
Richard
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
128 views
I have a radeditor,in that i have spans and a background image.I have some html input textboxes,on text changed of the textboxes,i'm binding the text to particular spans like:
<script>
 function txtTitlechanged(x) {
            var y = document.getElementById(x).value
            var editor = $find("<%=RadEditor1.ClientID %>");
            var oDocument = editor.get_document()
            var img = oDocument.getElementById('span1');


            if (y == '') {
                img.innerHTML = 'UserName';
            }
            else {
                img.innerHTML = y;
            }
        }
</script>

<input type='text' onchage="txtTitlechanged" />


Here i want that radeditor content as an image,i'm getting the radeditor content as html,but i want as it as an image.
Rumen
Telerik team
 answered on 19 Jan 2012
7 answers
250 views
I have a thierarchical grid needs to export.

I need to use  grid.ExportSettings.ExportOnlyData = false; becaues I need to keep the dropdown list template for my grid export.

But when export to excel I can see the expand image listed as a grey area in my excel export sheet. If it is a column, I know how to hide, but this doesn't seem to be a column on the grid. How can  I remove the grey expand area?

Thanks

 

Pavlina
Telerik team
 answered on 19 Jan 2012
4 answers
265 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!
Han
Top achievements
Rank 1
 answered on 19 Jan 2012
0 answers
76 views
We are using the MVC grid control with Razor in VB.  When I attempt to bind to the grid, I get an exception when one of the date columns that is passed back in the model contains a null.  When it doesnt contain a null, then it works fine.  I do not want the grid to try to bind this column at all - I do not need it in this view.  Is there a way to limit the columns that the grid is trying to use? 

I found this entry which seems to address the problem, but I do not see how to apply this in a Razor view.  Can anyone help? 

Here is the code from my View:

 

 

@(Html.Telerik().
    Grid(Model).
    Name("Grid").
    Columns(Sub(columns)
                    columns.Bound(Function(o) o.DocumentId).Width(20)
                    columns.Bound(Function(o) o.StatusCode).Width(20).Title("Status")
                    columns.Bound(Function(o) o.LastName).Width(10).Title("LastName")
                    columns.Template(Function(o) Html.ActionLink("View", "View", New With {.id = o.Id}))
            End Sub).
        Pageable.
        Sortable)
    )

 

 

 

 

JT
Top achievements
Rank 1
 asked on 19 Jan 2012
1 answer
92 views
Hi,
Please see the attached image.
The left side radtreeview i have achieved. All nodes are loading dynamically.Now I want to apply template concept to load a image for each node(based on some conditions of node parameters), on the right side, as shown. All this I need to dynamically. I have seen the documentation mentioned for telerik controls, but didn't gain much idea for this specific problem.
Please throw some light, how should I proceed.
Dimitar Terziev
Telerik team
 answered on 19 Jan 2012
1 answer
166 views
Hello,

I am using a grid that is included in a User Control and dynamically loaded to a RadTabStrip.

The problem I am having is that I am not able to process the ajax postback from grid in the code behind event handler RaisePostBackEvent.

Below is the RadAjaxManager code on the page hosting the RadStrip:

            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
                <ClientEvents />
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                            <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="18_userControl_RadGridDiscounts" LoadingPanelID="LoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>                
            </telerik:RadAjaxManager>

This is the call to PostBack the grid from javascript:

__doPostBack(gridid, itemIndex);

Do I need to change the setting of RadAjaxManager?
Antonio Stoilkov
Telerik team
 answered on 19 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?