Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
74 views
If I use user control to edit grid records can inject property/constructor to my control, or hook to any 'Pre' ItemCreated of the grid that I use event ?
Jacob
Top achievements
Rank 1
 asked on 06 Jul 2012
1 answer
133 views
I have a grid that opens up a fancybox on a nested item, it updates the tables and then when the fancybox closes the grid should reload the datasource and rebind.
JS
$("a.verifyAnalyst").fancybox({
    'width': '100%',
    'height': '100%',
    'autoScale': true,
    'transitionIn': 'none',
    'transitionOut': 'none',
    'type': 'iframe',
    'onClosed': function() {
                    $find("<%=WIPAjaxManager.ClientID%>").ajaxRequest("Rebind");
                }
});
Code Behind
protected void WIPAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    if (e.Argument == "Rebind")
    {
        WorkInProgressMainGrid.MasterTableView.SortExpressions.Clear();
        WorkInProgressMainGrid.MasterTableView.GroupByExpressions.Clear();
        WorkInProgressMainGrid.Rebind();
    }
}
The problem is that is actually calling the rebind, but the grid doesn't update, then when I click on any other button I get the following error:
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

I can't see why this is happening? Other Rebinds using onClick events are working 100%.

Can someone please advise me on how to reload the grid on closing of a fancybox.

Thank you.
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jul 2012
1 answer
125 views
I try to set value to RadRating using variabel <%= 5%>
<telerik:RadRating ID="rrBarnDia" Value='<%=5%>' Precision="Exact" Skin="Sitefinity" ReadOnly="true" Runat="server" />

But have error:
Cannot create an object of type 'System.Decimal' from its string representation '<%=5%>' for the 'Value' property.
What do i wrong?
Slav
Telerik team
 answered on 06 Jul 2012
4 answers
190 views
Hi,

I am using a radgrid to display data and RadMenu control for menu.
If, I reduce the size of the screen and click on filter of one of the columns in RadGrid, the filter menu items are getting hidden behind the RadMenu.

How do I bring the radgrid filter menu over the RadMenu?

Please help.

I have attached the screenshot of the problem.

Thanks,
Aditi
Aditi
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
86 views
Greetings,

I am currently trying to implement the AjaxSpellCheck into my RadEditor.  I am getting an issue about my dictionaries not existing.  I think the issue is I'm trying to cross domains.  Here is the scenario:

I have one project that has a Wiki within it.  The RadEditor exists here.
My other project, the main project of the site, contains the App_Data/RadSpell/en-US.tdf file, along with the web.config settings.

I'm trying to point the RadEditor to the main project's App_Data for it's dictionary.  Is that possible or does it need to be within the same project?

Kindest Regards,
Chad Johnson
Chad Johnson
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
59 views
Guys I am sorry I am following the below video tutorial and I am stumped


http://tv.telerik.com/watch/aspnet/radgrid/radgrid-edit-templates 

When I get to the part where I create Form Template. The author goes "You do not want to see me put this controls on" so then it fast forwards tills all the text boxes and buttons are on!!!!!!!

Thats what I want to see? I am new to this and need step by step instructions, if I am going to teach myself.

Is their a video where it shows you how to add the controls to a template?

Matt
Elliott
Top achievements
Rank 2
 answered on 06 Jul 2012
11 answers
545 views
I am using RadControls for ASP.NET AJAX Q1 2012 in my current project.

I have a web page which has a RadNumericTextBox and a RadGrid.

The RadGrid has In Place edit mode and only accepts double value on each cell.

I need to do the following on the web page :
1. After the user enters a value on the RadNumericTextBox, display a background colour on the RadNumericTextBox depending on the value entered.
2. After the user enters a value on each RadGrid cell, display a background colour on the RadNumericTextBox depending on the  value entered.

The background colour needs to be displayed as soon as the value has been completely entered.

Can you please help me how to do this?

Thanks,
Herman
Tsvetina
Telerik team
 answered on 06 Jul 2012
2 answers
320 views

I had a problem that I just could not understand why it would not work.
I use enums at times to populate dropdowns. For an example

[DataContract]
[Serializable]

public enum Corporate
{
  [EnumMember] [Description("FD")] COMPANY,
  [EnumMember] [Description("IB")] INDUSTRY,
  [EnumMember] [Description("KD")] PRIVATE,
  [EnumMember] [Description("SLE")] SLEIPNER
}

I want Company, Private etc to be populated in the dropdown and then get the description value back.
Well, this has nothing to do with Telerik so far. My problem was when in my datacontract I was using nullable
and wanted to use filter in my RadGrid. It would not work. I debugged my could and
found that the FilterExpression was set to "([Corporate] = INDUSTRY)". Now, this is just plain wrong.
It should be "([Corporate] = 'INDUSTRY')". Note the single quotation marks.

I fixed this issue by adding DataType="System.String" and then the filtering looked ok, but nope
it still did not work.

Why did it not work?

Well, it turned out that when I was using

[DataMember]
public Corporate Corporate { get; set; }

in my contract it works, but when using a nullable property

[DataMember]
public Corporate? Corporate { get; set; }

it did not work.

I fixed it by adding another class called searchcriteria and use that one
for my initial search containing my nullable Corporate and then my original class without nullable
for the filtering. This is very irritating. Can someone at Telerik look into this matter.

Best regards,
Claes


Ross Presser
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
420 views
Hi,

Title has a typo...
How to set column width to fit, when UseStaticHeaders="true"

I have a RadGrid which likes this:

            <telerik:RadGrid ID="CRMGrid" runat="server" AllowSorting="true" GridLines="None" OnSortCommand="CRMGrid_SortCommand" OnItemDataBound="CRMGrid_ItemDataBound" AllowMultiRowSelection="true" OnSelectedIndexChanged="CRMGrid_SelectedIndexChanged" ShowHeader="true">
                <HeaderStyle Width="100px" />
                <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="true" FrozenColumnsCount="1"/>
                </ClientSettings>
                <SelectedItemStyle CssClass="SelectedItem" />
                <MasterTableView Font-Names="Arial,sans-serif" TableLayout="Auto">
                    <Columns>
                        <telerik:GridClientSelectColumn>
                            <HeaderStyle Width="35" />
                            <ItemStyle Width="35" />
                        </telerik:GridClientSelectColumn>
                    </Columns>
                    <CommandItemSettings ShowExportToCsvButton="true" />
                    <HeaderStyle Font-Bold="true"/>
                </MasterTableView> 
            </telerik:RadGrid>

If UseStaticHeaders="true", then header and content are in 2 <div> and 2 <table> tags, table layout is fixed and column width can NOT be fit to max length of cell content. See picture 1.
If UseStaticHeaders="false", then header and content are in same div and table, column width is auto-fit, but header disappears when scroll down.See picture 2.

Any suggestion?
Thanks a lot.

Zhenyu Wang 


Tsvetina
Telerik team
 answered on 06 Jul 2012
4 answers
223 views
I have a working radgrid and would like the command line to appear so that I can add some buttons to it. However, I can't make the line visible. Any ideas?

<

 

telerik:RadGrid ID="rgdGrid" runat="server" AutoGenerateColumns="False" Culture="en-GB"

 

 

ShowStatusBar="True" ShowFooter="False" OnUpdateCommand="rgdGrid_UpdateCommand"

 

 

OnEditCommand="rgdGrid_EditCommand"

 

 

OnItemDataBound="rgdGrid_ItemDataBound" OnCancelCommand="rgdGrid_CancelCommand"

 

 

AllowSorting="True" GroupingEnabled="False" OnSortCommand="rgdGrid_SortCommand"

 

 

Width="100%" ShowGroupPanel="True" Skin="Web20"

 

 

MasterTableView-CellPadding="0" MasterTableView-CellSpacing="0" CellPadding="0" >

 

 

<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace"

 

 

ItemStyle-Wrap="False" CommandItemDisplay="Top" >

 

 

<CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToExcelButton="true" ShowExportToWordButton="true" />

 

<

 

CommandItemTemplate>

 

 

<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" />

 

 

<asp:LinkButton ID="btnUpdateSelected" runat="server" CommandName="UpdateSelected" />

 

 

</CommandItemTemplate>

 



DaveBarkshire
Top achievements
Rank 1
 answered on 06 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?