Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
153 views
I am developing Telerik Reporting and Inside a RadGrid I have checkboxes next to the dispalyed columns. What I want is, when the report load for the first time, the first 5 checkboxes should be checked automatically. User can uncheck or select up to 8 items and on preview button click see only the items checked.
All the radgrid columns am being  populated  with AutoGenerateColumns="True" from stored procedure. 
I have added this code and can see the checkboxes. How do I default the first 5 items as checked

<MasterTableView AllowMultiColumnSorting="true" NoMasterRecordsText="There are no data records to display."> 
                                            <Columns>
                                              <telerik:GridTemplateColumn HeaderText=""> 
                                                <ItemTemplate> 
                                                    <asp:CheckBox ID="CheckBoxStatus" runat="server" AutoPostBack="true"  /> 
                                                </ItemTemplate> 



Ebenezer
Top achievements
Rank 1
 answered on 12 Aug 2013
2 answers
455 views
We have a RadGrid control that is built dynamically through code in the Page's init phase.

One of the columns is a GridDateTimeColumn and the data source column is of type System.DateTime.

The problem we are having is that in the edit row (In Place editing), the datetime picker control doesn't render. It appears as a standard textbox control with no image to click to select a date.

The skin we are using is the included 'Telerik' skin, so custom skins should not be an issue. I've also tried removing the skin altogether, but that doesn't seem to work either.

The version of the rad controls we are using is 2013.2.611.40.

Anybody have any suggestions?

Thanks,

Charlie
Charles
Top achievements
Rank 1
 answered on 12 Aug 2013
1 answer
132 views
Hello

I am using an old version of RadGrid (2008 q3) but i hope you will still be able to help me.

The grid contains a CommandItemTemplate which is exported to excel. How do i get a handle on the CommandItemTemplate before the grid is exported to apply formatting to it? Is there a way to format it using the grid's css file? However I would rather know a way for apply formatting directly in the code behind as my skin styles are not being applied to the grid on export anyhow

thanks in advance for your help
Kostadin
Telerik team
 answered on 12 Aug 2013
8 answers
162 views
Hi Telerik Team,

kind of difficult to describe, but i hope you can give me a hint...

i have a hierarchical grid, which is always in editmode.
Many dynamically generated textboxes in this grid are validated by the RadInputManager.

On a button of the page, we open a radwindow.
If the grid is opened to a deep level, we get an error when we try to open the radwindow.

TargetControls ....
protected void RadGridHierarchy_ItemCreated(object sender, GridItemEventArgs e)
        {
...
                TextBox tbVolumeTarget = ((TextBox)item["VolumeTarget"].Controls[0]);
                NumericSetting.TargetControls.Add(new TargetInput(tbVolumeTarget.UniqueID, true));
...

RadWindow:
ButtonClick ...
 
RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(@"OpenProfitabilitySimulation();");           
 
JavaScript:
 
  function OpenProfitabilitySimulation() {
                var a = setTimeout('doOpenProfitabilitySimulation()', 500);
            }
 
            //Open RadWindow for profitability simulation
            function doOpenProfitabilitySimulation() {
                var oWnd = $find("<%=RadWindow_Create_Contract_ProfitabilitySimulation.ClientID %>");
                oWnd.show();
            }


With a small grid it works fine.
But when the grid gets bigger, it seems, that there is not enough time to dispose everything, before opening the window.

Following line throws the error in runtime. (NullException) 

"eval.code":
$find('ContentPlaceHolderDefault_ContentPlaceHolderMain_ctl00_CreateContractWorkflow_3_ucCreateContract_ucContractHierarchy_RadInputManager1_NumericBehavior').dispose();


Possible soulutons, which are not a good option:
- it is possible to raise the Timeout, before opening the Radwindow, (but to what? The time is depends on the client. And the Grid size)
- make a complete postback and afterwards open the radwindow, That also works fine. (but clicking two buttons is not a solution)

Do you have any other ideas?
How can i wait with the window opening, until the controls have been correctly disposed?

Is it a problem of the RadInputManager?

Thanks in advance

KR

Lars
Bob
Top achievements
Rank 1
 answered on 12 Aug 2013
2 answers
77 views
I have a rad grid which allows filtering by column. Everything works fine except that in one column I have several records with values that start with "*". When I search by * I get all rows back an not the rows starting with *. If I enable linq expressions then searching by * works but then case insensitive searching no longer works.
I think RadGrid is using * as a shortcut indicator to do a "starts with" search. How can I get the filter to search for *?

Thanks,
Chris
Chris
Top achievements
Rank 1
 answered on 12 Aug 2013
1 answer
59 views
Hi,

i just upgraded to telerik 2013.1.417.40 and i have noticed the default font of the controls has changed. Is there any way to get the default fonts back or to override the new default fonts.

Thanks,
Vineet
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2013
9 answers
469 views
Hi,

this is my first time using OnNeedDataSource. I've followed the sample codes within the demo to create a code-behind on the C# file. The Event on the code behind fails to fire. the following was my error message.

Compiler Error Message: CS1061: 'ASP.wellvent_aspx' does not contain a definition for 'RadGrid1_NeedDataSource' and no extension method 'RadGrid1_NeedDataSource' accepting a first argument of type 'ASP.wellvent_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 44:                    </telerik:RadAjaxManager>
Line 45: 
Line 46: <telerik:RadGrid ID="RadGrid1" GridLines="None" AutoGenerateColumns="False" runat="server" Line 47:                       AllowPaging="True" AllowSorting="True" 
Line 48:                       OnNeedDataSource="RadGrid1_NeedDataSource" 


This is the first part of my aspx file

<

telerik:RadGrid ID="RadGrid1" GridLines="None" AutoGenerateColumns="False" runat="server"

AllowPaging="True" AllowSorting="True"

OnNeedDataSource="RadGrid1_NeedDataSource"

OnItemDataBound="OnItemDataBoundHandler"

AllowAutomaticUpdates="True" AllowAutomaticInserts="True"

ShowStatusBar="True" AllowFilteringByColumn="True" CellSpacing="0" EnableAJAX="True">

<MasterTableView ShowFooter="false" DataKeyNames="ResultsID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">

<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

<Columns>

<telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"

HeaderText="Edit" HeaderStyle-Width="25px" UpdateText="Update">

<HeaderStyle Width="25px" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />

</telerik:GridEditCommandColumn>

<telerik:GridButtonColumn FilterControlAltText="Filter Delete column"

HeaderText="Delete" HeaderStyle-Width="25px" Text="Delete" UniqueName="DeleteColumn">

<HeaderStyle Width="25px" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>  

 

</telerik:GridButtonColumn>

<telerik:GridTemplateColumn UniqueName="AreaName" HeaderText="Area"

SortExpression="AreaName" ItemStyle-Width="150px">

<FooterTemplate>

Template footer

</FooterTemplate>

 

<FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />

 

<ItemTemplate>

<%

#DataBinder.Eval(Container.DataItem, "AreaName")%>

</ItemTemplate>

 

<EditItemTemplate>

 

<telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="AreaName"

 

OnItemsRequested="RadComboBox1_ItemsRequested" DataValueField="ID" AutoPostBack="true"

 

HighlightTemplatedItems="true" Height="140px" Width="100px" DropDownWidth="120px"

 

OnSelectedIndexChanged="ComboBox1_OnSelectedIndexChangedHandler">

<ItemTemplate>

<%# DataBinder.Eval(Container, "Text")%>

</ItemTemplate>

 

</telerik:RadComboBox>

 

</EditItemTemplate>  

 

<HeaderStyle Width="100px" />  

 

<ItemStyle Width="100px"></ItemStyle>  

 

</telerik:GridTemplateColumn

This is the first part of my C# code private void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

 {

Gary
Top achievements
Rank 1
 answered on 12 Aug 2013
4 answers
112 views
Hi,

How to add a CheckAll button to dropdowntree?

Thanks,
Berk.
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2013
1 answer
183 views

I am trying to make it that on page load in the code behind, I disable a button in the radmenu using javascript

the error is : cant find object - $find('myRadMenu') and the name is correct, so it has something todo with when the radmenu is rendered so I tried a wrap my script in a document.ready but that also won't work

Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load

ClientScript.RegisterStartupScript(Me.GetType(), "test", "<script type='text/javascript'> $find('myRadMenu').findItemByText('MyButton').disable(); </script>")

End Sub

Do you know how to disable a radmenu button from javascript that is called from the vb.net page load function.

It must be done this way as I have other javascript that needs to fire

Shinu
Top achievements
Rank 2
 answered on 12 Aug 2013
4 answers
586 views

Hi ,
I want only add,delete button in RadUpload. how can i achieve this ?

Regards,
Akki
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2013
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?