Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
127 views
Help...

I am trying to create a relatively simple (but generic) report page.
Eventually, it calls a stored procedure (defined dynamically) that may return one or more recordset(s).

For each recordset, I want to create a simple grid that I simply bind to my dataset.

The user specify one or more criteria and press a button, at which time I try to create my grid(s).

My code, called from within the Button Click method looks like this (phReport is a PlaceHolder control)
        public void BuildAGrid(SqlDataReader reader)  
        {  
            RadGrid grid = new RadGrid {DataSource = reader};  
            grid.EnableViewState = false;  
            grid.DataBind();  
 
            phReport.Controls.Add(grid);  
        }  

The Grid shows and contains the right columns BUT shows "No records to display".

Initially, I had left EnableViewState as default (true) for both the PlaceHolder and the dynamically created grid and it showed the records when pressing the button a second time (I suppose the rows were then coming from the ViewState somehow as it seemed to hold the data).

The various articles I found say to create the grid in the Page_Init event but mine need to respond to the button click...

Any idea what I am doing wrong, or what I should do?

Many Thanks


Eric
Eric
Top achievements
Rank 1
 answered on 21 Aug 2009
3 answers
126 views
I have a header control:


 
<HeaderTemplate> 
<asp:LinkButton runat="server" ID="lbSelectAllItems" Text="Select All" CommandName="SelectAllItems" CommandArgument="qualification" ></asp:LinkButton> 
</HeaderTemplate> 

I tried to add a javascript function in "OnClientClien" property to confirm action.

OnClientClick='return ConfirmSelectItem()'


when I click on the linkbutton at run time i get javascript error "object expected".

any idea what I am doing wrong?

thanks in advance
Princy
Top achievements
Rank 2
 answered on 21 Aug 2009
1 answer
192 views
Hi,
how to check kind of a control with jquery that this control is a RadComboBox or TextBox?
E.g.: I have a RadComboBox with id="Street" and I want to know if there is a RadComboBox.
Thanks.
Veselin Vasilev
Telerik team
 answered on 21 Aug 2009
2 answers
210 views

Hi,

i am using Q2 2009 skin , i wann to change to error message  font size.pls find the followin skin i am using

.RadWindow_RTBOlive .rwTopLeft,
.RadWindow_RTBOlive .rwTopRight,
.RadWindow_RTBOlive .rwTitlebar,
.RadWindow_RTBOlive .rwFooterLeft,
.RadWindow_RTBOlive .rwFooterRight,
.RadWindow_RTBOlive .rwFooterCenter,
.RadWindow_RTBOlive .rwTopResize,
.RadWindow_RTBOlive .rwStatusbar div,
.RadWindow_RTBOlive .rwStatusbar,
.RadWindow_RTBOlive .rwPopupButton,
.RadWindow_RTBOlive .rwPopupButton span,
.RadWindow_RTBOlive.rwMinimizedWindow .rwCorner,

{
    background-image: url('/PublishingImages/Window/WindowHorizontalSprites.gif'); 
    font-family:Arial, Helvetica, sans-serif !important;
 font-size:12px;

}

.RadWindow_RTBOlive .rwBodyLeft,
.RadWindow_RTBOlive .rwBodyRight,
.RadWindow_RTBOlive .rwStatusbarRow .rwCorner
{
 background-image: url('/PublishingImages/Window/WindowVerticalSprites.gif');
}

.RadWindow_RTBOlive .rwStatusbar input
{
    background-color: #f7f3e9;
  

}

.RadWindow_RTBOlive .rwControlButtons a
{
    background-image: url('/PublishingImages/Window/CommandButtonSprites.gif');
}

.RadWindow_RTBOlive a.rwIcon
{
 background-image: url('/PublishingImages/Window/WindowHorizontalSprites.gif');
}

div.RadWindow_RTBOlive .rwTitlebarControls em
{
 color: black;
}
div.RadWindow_RTBOlive .rwDialogInput
{
 border-top: solid 1px #556b2f;
 border-right: solid 1px #556b2f;
 border-bottom: solid 1px #556b2f;
 border-left: solid 1px #556b2f;
}

div.RadWindow_RTBOlive .rwDialogInput:hover
{
 border-top: solid 1px #556b2f;
 border-right: solid 1px #556b2f;
 border-bottom: solid 1px #556b2f;
 border-left: solid 1px #556b2f;
 color: #565656; 
}

div.RadWindow_RTBOlive td.rwLoading
{
    background-color: #fff;
}

.RadWindow_RTBOlive td.rwWindowContent
{
    background-color: #fff !important;
 }

/* Loading Indicators */

/* When ShowContentDuringLoad="true" */
.RadWindow_RTBOlive td.rwWindowContent.rwLoading
{
    background-image: url('/PublishingImages/Common/loading.gif');
}

/* When ShowContentDuringLoad="false" */
.RadWindow_RTBOlive input.rwLoading
{
    background-image: url('/PublishingImages/Common/loading_small.gif');
}

Thanks
Mala

Vittal
Top achievements
Rank 1
 answered on 21 Aug 2009
2 answers
232 views
Hi,

I was wondering if any one could help me. This is the setup:-
SQL Datasource:-
<asp:SqlDataSource ID="GridSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:connect %>" 
                        SelectCommand="FilterProcMainv2" SelectCommandType="StoredProcedure">  
                        <SelectParameters> 
                            <asp:Parameter Name="owner" Type="Int32" /> 
                            <asp:Parameter DefaultValue="7" Name="team" Type="Int32" /> 
                        </SelectParameters> 
                    </asp:SqlDataSource> 
 Part of the Grid:-
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="GridSqlDataSource" 
                        GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
                        PageSize="15" ShowGroupPanel="True">  
                        <MasterTableView DataSourceID="GridSqlDataSource" DataKeyNames="work_request_pk">  
                            <Columns> 
The grid has a number of filter columns dates and combo boxs with their own datasources. The grid loads with out any problems if I set it to  datasource with out any paremeters.

I've checked my sql and it works fine, I've debugged the stored procedure and its returning the results I want.

if anyone could help or point me in the right direction it would be a great help.

Thanks
Yavor
Telerik team
 answered on 21 Aug 2009
1 answer
189 views
Hi,

I am having issues with the left scroll button not working if I set the selected tab on the server side and then call scrollIntoView() in the OnClientLoad event.

My tabstrip is configured as below:

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="false" OnClientLoad="ScrollToActiveTab" ScrollButtonsPosition="Middle" ScrollChildren="true" PerTabScrolling="true" Width="708">

 </telerik:RadTabStrip>

 



After adding tabs to the TabStrip programmatically, I am setting the selected tab like so:

Telerik.Web.UI.RadTab selectedTab = RadTabStrip1.FindTabByUrl(url);

 if (selectedTab != null)

 {

selectedTab.SelectParents();

selectedTab.Selected = true;

 }



Then, in the OnClientLoad event, I am calling this method:

function ScrollToActiveTab(sender, eventArgs) {

var selectedTab = sender.get_selectedTab();

if (selectedTab != null) {

 selectedTab.scrollIntoView();

}

}



In the browser, the correct tab is selected, and everything is rendered fine except that when I click the left scroll button to scroll to tabs that come before the selected one, I get this javascript error:

tabs.getTab(this._currentTabIndex + _118) is undefined

 


T. Tsonev
Telerik team
 answered on 21 Aug 2009
9 answers
596 views
Hello,

after I add a FormDecorator, VS2008 is gives me an error for the javascript generated. This is the line:

var _8=_6.__lookupSetter__("checked");

And these are the 2 error messages returned:

Microsoft JScript runtime error: Object doesn't support this property or method

Microsoft JScript runtime error: 'Telerik.Web.UI.FormDecoratorDecoratedControls.Default' is null or not an object

What would be the cause?

Thank you!
Lini
Telerik team
 answered on 21 Aug 2009
2 answers
123 views
Hi, I have an Horizontal RadMenu on the header of the page of a Master Page, which child items expand vertically.  In a child page of such Master Page, I have a RadDockLayout with several RadDockZones and RadDocks inside.  The issue is that when I expand my RadMenu to select one of its child items, the expanded menu goes underneath my RadDocks instead of expanding on top of them.  I have tried solving this problem tinkering with the Z-Indexes of the items in the page to no avail.  This is happening in IE8 Compatibility View and IE7, however, in Firefox 3.5 and IE8 (without compatibility view) it is working perfectly.

What else can I do?? Is the Master Page the problem??

Thanx,
Manuel
Helen
Telerik team
 answered on 21 Aug 2009
1 answer
182 views
Hey,

I am having problems with my control validation.  I am using the validation that you provided on this page: Validation.  My problem is that when my application calls my insert or update I am not able to grab the values inside my grid that have the validators attached to them.  When I remove the validation my code grabs the vaules properly.  Any help would be great.

Here is the code that is grabbing data out of my grid:

GridEditableItem editedItem = e.Item as GridEditableItem;
            GridEditManager editManager = editedItem.EditManager;

            int i = 0;
            foreach (Telerik.Web.UI.GridColumn column in e.Item.OwnerTableView.RenderColumns)
            {
                if (column is IGridEditableColumn)
                {
                    IGridEditableColumn editableCol = (column as IGridEditableColumn);
                    if (editableCol.IsEditable)
                    {
                        IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);

                        if (editor is GridDropDownColumnEditor)
                        {
                            CoverageUpdates[i] = (editor as GridDropDownColumnEditor).SelectedValue;
                            i++;
                        }
                        else if(editor is GridNumericColumnEditor)
                        {
                            CoverageUpdates[i] = (editor as GridNumericColumnEditor).Text;
                            i++;
                        }
                        else
                        {
                            CoverageUpdates[i] = (editor as GridTextColumnEditor).Text;
                            i++;
                        }
                    }
                }
            }

Here is my validator code:

if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = e.Item as GridEditableItem;

                GridNumericColumnEditor editor = (GridNumericColumnEditor)item.EditManager.GetColumnEditor("CoverageLimit");

                TableCell cell = (TableCell)editor.NumericTextBox.Parent;

                RequiredFieldValidator validator = new RequiredFieldValidator();
                editor.NumericTextBox.ID = "clID";
                validator.ControlToValidate = editor.NumericTextBox.ID;
                validator.ErrorMessage = "Required";
                cell.Controls.Add(validator);

                GridNumericColumnEditor editor2 = (GridNumericColumnEditor)item.EditManager.GetColumnEditor("Deductible");

                TableCell cell2 = (TableCell)editor2.NumericTextBox.Parent;

                RequiredFieldValidator validator2 = new RequiredFieldValidator();
                editor2.NumericTextBox.ID = "dId";
                validator2.ControlToValidate = editor2.NumericTextBox.ID;
                validator2.ErrorMessage = "Required";
                cell2.Controls.Add(validator2);
            }






Thanks,

Kyle Jones
Iana Tsolova
Telerik team
 answered on 21 Aug 2009
1 answer
136 views
Hello,
Are there plans to add richer keyboard support to this control? Peter Blum's keyboard support is very extensive for their date picker and I would love to see that level of support in your control. Right now, I have to add some javascript to put the current date in focus and then use tabs to change dates. I would love to be able to use my arrow keys to jump weeks, the T key to get today's date, and other shortcuts that make sense.
Thanks
-marcos
Tsvetoslav
Telerik team
 answered on 21 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?