Telerik Forums
UI for ASP.NET AJAX Forum
20 answers
306 views
Hi,
I have a grid with a commanditemtemplate created server-side on page_load.
Within this template is a linkbutton to export the grid contents.
The grid is ajaxified through ajaxmanager.

From the code library, i have used OnRequestStart of the ajaxmanager and a javascript function to export the grid.
This works fine, however, i am then losing all my grid settings which i set server-side within the page_load. ie; commanditemtemplate , filterbars, Itemtemplate columns, paging layout etc.
It seems to reset to the grid layout set within the aspx, but i have functions from page_load which sets all this based upon user.

Here is my javascript code...

 

function gridRequestStart(grid, eventArgs)

 

{

 

if((eventArgs.EventTarget.indexOf("exportButton") != -1))

 

{

eventArgs.EnableAjax =

false;

 

ExportGrid()

}

}

 

function ExportGrid()

 

{

 

var masterTable = $find("<%=grdPO.ClientID %>").get_masterTableView();

 

masterTable.exportToExcel();

}

Can you provide any ideas on how to use my page_load functions to set the grid layout once this script has executed ?

Many Thanks
Mark

Shinu
Top achievements
Rank 2
 answered on 10 Jun 2009
6 answers
196 views
Dear Telerik,

I am using build 2009.1.311.35.  I have a RadGrid with a UserControl edit form.  The edit form is a bit unconventional as it manually performs database updates instead of invoking the RadGrid's "Update" command.  For us, it is desirable to keep the edit form open as it does other things in addition to updating an item.  To close the edit form, I have a linkbutton with the "Cancel" command.

The RadGrid contains filters so that at any given time only filtered items are shown.  When the user makes certain changes to an item's attributes in the edit form, the RadGrid's Rebind() method is called.  If the item's attributes no longer satisfy the filter's criteria, it is no longer shown.  The edit form is now automatically opened for the next item in the view.  In a sense, this behavior is desirable as it is convenient for a user to make changes to multiple items without having to manually edit each one.

However, a problem is that when the edit form is automatically opened, the OnItemCommand or OnEditCommand events are NOT fired.  We must rely on these events to perform initialization when a new item is edited.  Unfortunately we cannot use the UserControl's DataBinding or PreRender events as these also get invoked when the UserControl does postbacks (yes, we're probably using the UserControl Edit Form in ways you didn't intend :)

Ideally for us, the edit form should not be open automatically once the RadGrid is re-bound.  Do you have any suggestions or alternatives? 

Any help is greatly appreciated. Thanks,

Yen
Yen
Top achievements
Rank 1
 answered on 09 Jun 2009
3 answers
87 views
We just updated our Telerik assemblies and are getting RadDock errors.

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Method 'get_Zones' does not have an implementation.

If we revert to the previous version of the assembly, this message goes away.  Has anyone else encountered this?



Mark
Top achievements
Rank 2
 answered on 09 Jun 2009
1 answer
151 views
Hi guys,

I want to compare a cell text / uniquefield.value to the same field above.
If the text is the same as above (double post) I want to make the text red.

I thought this shouldn't be so hard, but my approach isn't working.

My first thought was to have a public string that I change in the databound event once I've compared it to the cell text:
        Dim nameCell As TableCell = dataItem("Name"
        If nameCell.Text = strLastPlayer Then 
            nameCell.ForeColor = Drawing.Color.Red 
        End If 
        strLastPlayer = nameCell.Text 

This doesn't work, it always returns true and the text is always red.
My second try was this:
        If e.Item.ItemIndex > 0 Then 
            Dim intPrev As Integer = e.Item.ItemIndex - 1 
            Dim prevItem As GridDataItem = RadGrid1.Items(intPrev) 
 
            Dim nameCell As TableCell = dataItem("Name"
            Dim prevNameCell As TableCell = prevItem("Name"
 
            If nameCell.Text = prevNameCell.Text Then 
                nameCell.ForeColor = Drawing.Color.Red 
            End If 
 
            'strLastPlayer = nameCell.Text 
 
        End If 

But it has the same result, always true and all fields red.
I must be missing something obvious here, can anyone spot it?

Regards,
-DJ-
-DJ-
Top achievements
Rank 1
 answered on 09 Jun 2009
8 answers
314 views
Is there any way to set value to some radtextbox or another control inside radwindow using Selenium?
I need in my test press button which opens radwindow, set values to textboxes and click submit.
I can't get access to controls inside radwindow
Fiko
Telerik team
 answered on 09 Jun 2009
3 answers
253 views
Hello,

I am having an issue with the custom templates with the scheduler, What i am trying to do is, have a custom template for inline insert and for the advanced. What i did was create a template for the inline insert with 3 buttons (insert, cancel, advanced), the insert and cancel buttons work fine, but after i click the advanced it throws a "Object reference not set to an instance of an object." and it has this stack trace "
 Telerik.Web.UI.RadScheduler.SwitchToAdvancedMode() +202
 Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +582
 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 "
But if I use the default template for the inline insert then click "options" it will show my custom advanced template.
Seems like i am missing something, so i would appreciate any help.
Here is my code for the schedule control:

 <pro:RadScheduler runat="server" ID="RadScheduler1" Width="750px" SelectedDate="2007-03-30"
            DayStartTime="08:00:00" DayEndTime="18:00:00" ShowViewTabs="false" StartEditingInAdvancedForm="false"
            DataSourceID="MessagesDataSource" DataKeyField="MessageId" DataSubjectField="MessageText"
            DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"
            DataRecurrenceParentKeyField="RecurrenceParentID" OnAppointmentCommand="RadScheduler1_AppointmentCommand"
            OnFormCreated="RadScheduler1_FormCreated" OnFormCreating="RadScheduler1_FormCreating">
            
            
            <AppointmentTemplate>
                <div>
                </div>
            </AppointmentTemplate>
            <InlineEditTemplate>
            <div>
            <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
                            
                        </asp:LinkButton>
                        <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
                            
                        </asp:LinkButton>
                        <asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
            </div>
            </InlineEditTemplate>
            <InlineInsertTemplate>
            <div>
                        <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
                            
                        </asp:LinkButton>
                        <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
                            
                        </asp:LinkButton>
                        <asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
            </div>
            </InlineInsertTemplate>
            <AdvancedEditTemplate>
               <div>
               Advanced EDIT TEMP
               </div>
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
              <div>
               Advanced TEMP
               </div>
            </AdvancedInsertTemplate>
        </pro:RadScheduler>

Regards


Dimitar Milushev
Telerik team
 answered on 09 Jun 2009
3 answers
199 views
I have a 2 level hierarchal grid. The 2nd level grid contains several template columns with radtextbox's. One of the columns is to capture a starting page number and another is to capture and ending page number.

When editing a row in the 2nd level grid I would like to copy the contents of the starting page number column to the ending page number column.

I assume i need to call a javascript function using the OnTextChanged event from the radtextbox for the Starting page number column, but I don't know how to access the starting page number and ending page number text box's from within the javascript function.

Thanks for your help.
Sebastian
Telerik team
 answered on 09 Jun 2009
1 answer
169 views
Hi:
I have a grid with the Log4Net table displayed.  The Message and Exception columns are over 2000 characters long.  Upon the page initially displaying it is really ugly (message column not wrapping, text beyond the edge of grid).  Click the Next Page and then it is better, but still ugly.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"  
    AutoGenerateColumns="False" DataSourceID="logsDataSource" GridLines="None"  
    Skin="Office2007" Width="100%"
    <HeaderContextMenu Skin="Office2007"
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </HeaderContextMenu> 
    <MasterTableView DataSourceID="logsDataSource" Width="100%" > 
        <Columns> 
            <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="idColumn" /> 
            <telerik:GridDateTimeColumn DataField="Date" HeaderText="Date" UniqueName="dateColumn" /> 
            <telerik:GridBoundColumn DataField="Thread" HeaderText="Thread" UniqueName="threadColumn" /> 
            <telerik:GridBoundColumn DataField="Level" HeaderText="Level" UniqueName="levelColumn" /> 
            <telerik:GridBoundColumn DataField="Logger" HeaderText="Logger" UniqueName="loggerColumn" /> 
            <telerik:GridBoundColumn DataField="Message" HeaderText="Message" UniqueName="messageColumn" /> 
            <telerik:GridBoundColumn DataField="Exception" HeaderText="Exception" UniqueName="exceptionColumn" /> 
        </Columns> 
        <PagerStyle Position="TopAndBottom" /> 
    </MasterTableView> 
    <FilterMenu Skin="Office2007"
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </FilterMenu> 
</telerik:RadGrid> 
 

How can I get this to fit within a page and my boss not say, 'unacceptable'?
http://logging.apache.org/log4net/release/config-examples.html


Use above for schema...
Phil
Sebastian
Telerik team
 answered on 09 Jun 2009
1 answer
123 views
Hi,

I am using css class for Radgrid header, when sorted on the column the image is getting hiden and shown in skin color, is there any way to show the sort image properly. Andalso i am having the scroll header color different from column header.


<

 

HeaderStyle CssClass="DataGridHeader" ForeColor="White" />

 


<

 

ClientSettings AllowDragToGroup="False">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="275px"></Scrolling>

 

 

</ClientSettings>

 



Thanks
Venu
Georgi Krustev
Telerik team
 answered on 09 Jun 2009
1 answer
370 views
Hi,

Using 2009 Q1...

I have a RadWindowManager containing a RadWindow :
    <telerik:RadWindowManager ID="windowManager" runat="server"
        <Windows> 
            <telerik:RadWindow ID="winNewUser" runat="server" KeepInScreenBounds="true" Modal="true" Behaviors="Move,Close,Resize" ReloadOnShow="true" AutoSize="true" /> 
        </Windows> 
    </telerik:RadWindowManager> 
 

I have a RadGrid with a column defined like this :
<telerik:GridButtonColumn UniqueName="colBtnDelete" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Confirm delete ?" ConfirmTitle="Delete" Text="Delete" ButtonType="PushButton" Groupable="false" /> 
 

When I click on the button, my window "winNewUser" is shown on top of the confirm dialog... Is this a normal behavior ?

And is it possible to let the button be visible according to a data condition ? (like a boolean field)

Thanks.


Sebastian
Telerik team
 answered on 09 Jun 2009
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?