Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
80 views
Hi,
I have a Rad Grid, Button1 and a User control  in a page. I want  to set Button1 (from Page) and  Button2  (from User control) as trigger control to RadGrid . On clicking any of these buttons RadGrid should be updated. I want to use Rad Ajax manager  to set the Updated Control and Ajaxified Control.

I found couple of samples where control in UserControl updates  updates a textbox in parentpage or a control in parent page updates a label in user control but couldnot find any example where  two different controls in parent page and user control act as a trigger to update a single control.   How can I implement the above objective?

Sincerely,
Prava
Mira
Telerik team
 answered on 23 Sep 2010
1 answer
71 views
As topic.

Thx
Pero
Telerik team
 answered on 23 Sep 2010
2 answers
331 views
Hi all

please, have you some suggestion about how to disable special days in the raddatepicker?

Must be iterative. I mean, for example, I want for each month, each year, to get enabled only the 1st day and the 15th day of each month.

Can be do it?

Thank you all

Regards
Fabio
Top achievements
Rank 1
 answered on 23 Sep 2010
1 answer
91 views
I have a page with two RadGrid. When i enter number in my first RadGrid i want the second grid to update because it calculed some number and show me the total in the second grid.
How do i get the second grid to update without having to update the page.
I am working with the double click edit RadGrid.
In aspx i use to do Nameofthegrid.update or refresh. But doesn't work with RadGrid.

thank you 
Gaétanne 
Pavlina
Telerik team
 answered on 23 Sep 2010
1 answer
260 views
Hello,

I have a RadGrid that I'm attempting to use in form editing on. I'm currently using the following GridTemplateColumn. The problem is that what I really need is an InsertItemTemplate like what asp:DetailsView has. This is because I want the Status field to be editable in a RadComboBox on insert, but, non-editable and displayed in a label on edit. Does anyone know if this is possible in RadGrid? I'm assuming that I'll probably have to handle an event and adjust the visibility of fields based on whether it's in insert or edit mode? The problem is that I don't know what event I should use to do this and I also don't know how to lookup the control. I'm assuming I'll probably have to use FindControl() and maybe use the RowIndex to find the proper row in the grid or something. Any help would be greatly appreciated.

 

 

<telerik:GridTemplateColumn HeaderText="Status" SortExpression="Status">

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="StatusRadComboBox" runat="server" SelectedValue='<%# Bind("Status") %>'>

 

 

 

<Items>

 

 

 

<telerik:RadComboBoxItem Text="" Value=""></telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem Text="Assigned" Value="Assigned"></telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem Text="Lost" Value="Lost"></telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem Text="Returned" Value="Returned"></telerik:RadComboBoxItem>

 

 

 

</Items>

 

 

 

</telerik:RadComboBox>

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Value is required"

 

 

 

ControlToValidate="StatusRadComboBox"></asp:RequiredFieldValidator>

 

 

 

</EditItemTemplate>

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 




Jon
Marin
Telerik team
 answered on 23 Sep 2010
1 answer
99 views
Hi,

I am using the Radgrid's client-Events -> Oncommand  handler to add some validations  to a button before it is submitted, it works fine and was able to cancel the event when a criteria is not met, but for some buttons like the "Delete" button where I didnt add any validations,  the itemindex that is passed on my server side  OnItemCommand  event handler is always zero. Is this supposed to be the case? How do I pass the itemindex argument?  I tried to do a firecommand (args.get_commandName(), args.get_commandargment()) but it returns an out of memory exception. Please see below code that I have for the raisecommand


function raisecommand(sender,args){
if (args.get_commandName=="ViewDetails"){
<<some validations here>>
args.set_cancel(true);
        }

}


Thanks
Princy
Top achievements
Rank 2
 answered on 23 Sep 2010
1 answer
102 views
I'm using a RadGrid with a LinqDataSource, there is a money DataBase column, in the Grid, it is a GridNumericColumn, with NumericType="Currency".

When I try to filter values with commas, the commas (decimal separator) are simply ignored, and after the post, the value appears in the filter as the comma didnt existed.

I've implemented the ItemCommand event, and got the RadNumericTextBox, it's Value, and Text is shown already wrong, so I tried to divide it by 100, to correct the value, in this case, nothing is done, and the filter stop working.

My Culture-Info is pt-BR. I have changed it to en-US, and it works ok (for dots, as decimal separators), also my workaround in the ItemCommand works for en culture...

Is it a known issue? What can I do to get around this behavior?

Thanks in advance, and congratulations for the great work!

Fernando Mondego
Daniel
Telerik team
 answered on 23 Sep 2010
4 answers
187 views
Hi All. Sorry if this has been answered previously but i couldn't find any related posts.

I am trying to design a grid with the "Add a New Record" option in the header and footer (CommandItemDisplay="TopAndBottom")  for an InPlace insert. It works great if i put a command column in the grid. However I would like to only show the insert and cancel commands in the row that is to be inserted. The MasterTableView has the "AllowAutomaticInserts="true" property set, none of the other automatic properties are set. I do not want an edit option on all the other existing rows in the grid. Can someone point me in the right direction to accomplish this?

Thanks for your help.
Scott
Pavlina
Telerik team
 answered on 23 Sep 2010
2 answers
112 views
Hi
I am using the same method for binding data returned from json to the client side.
Please note that i am using this Grid in asp.net MVC 1.0. Script Manager and all other telerik objects are loading properly and i am receiving this JSON from a method which returns JSON. I hope that the given code is sufficient, however i can provide you MVC code, if required:
I am using the following code:

$.ajax({
            type: "POST",
            url: getAppPath() + "Account.aspx/UsersList",
            data: { State: StateVal, County: CountyVal, District: DistrictVal, School: SchoolVal, sUserName: userName, sUserEmail: email, Status: StatusVal },
            success: function(results) {
                //alert(results);
                updateGrid(results);
            },
            error: function(msg) {
                alert("The following error occurred: " + msg.status + ": " + msg.statusText);
            }

        });

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
           

            function updateGrid(result) {
                var tableView = $find("<%= grdUsers.ClientID %>").get_masterTableView();
                tableView.set_dataSource(result);
                tableView.dataBind();
            }

            function RadGrid1_Command(sender, args) {
                
                var a = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                args.set_cancel(true);
                alert("page command");

            }


        
    
        </script>

    </telerik:RadCodeBlock>

When i call the updateGrid method
                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
the following line returns null. However if i only use this line, it will find the Grid.
var a = $find("<%= RadGrid1.ClientID %>")
Please let me know how to handle it and later assign the json to grid in order to populate it.
Thanks.
Radoslav
Telerik team
 answered on 23 Sep 2010
2 answers
94 views
I am using RadEditor in my page to perform add and edit operations, it works like a charm in IE7 and IE8, but i am facing some problems in IE6.
when the page loads the control looks just fine but after postback on any control on the page (i.e dropdown or something) the editor control stretches.
please check the attached image just to be clear as to how the editor looks on postback and in normal view.
would be grateful if anyone could provide me with a workaround...
Senthil ramna
Top achievements
Rank 1
 answered on 23 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?