Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
Hello,

I have some pages with a significant amount of Telerik controls which can sometimes take 2-4 seconds to load in Firefox. I have noticed that sometimes, if the user mouses over a Telerik control on the page before it has been completely loaded (before FormDecorator styles have been applied), the page will throw a javascipt error in

Sys.Application.add_init(function()  $create(Telerik.Web.UI.RadToolBar, {"_cssClass":"","_rawPostBackReference":"WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions
 ...
 });

The error says "[Client-side event handler function name] is undefined" and then the page completely pukes and I cannot interact with any controls. I was wondering if this issue has ever been seen before and if there is a solution for it.

Thanks
Kamen Bundev
Telerik team
 answered on 04 Dec 2010
1 answer
140 views
We have a situation where users can filter a grid, using custom code that sets the mastertableview.filterexpression value, but can then choose to edit or drill down.

What I'd like to do is to restore the most recent filter settings when the user returns to the page. Ideally I'd also like to restore the dropdown and textbox values in my form, but that's secondary.

Does the Grid provide any mechanism to do that? If not, any suggestions about a best-practices approach?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 04 Dec 2010
6 answers
217 views
Hi there,

I am using edit mode of type PopUp for doing update/insert using radgrid. i have used OnUpdateCommand="RadGrid1_UpdateCommand" event and defined it on code behind. but when i click on update button on popup form after modifying text fields, my update command event is not triggering and page shows like it got updated even though not. please anyone provide me solution. Delete works fine and delete event triggers as normal so problem is only with edit update event.  here is a part of my code,

<telerik:RadGrid ID="RadGrid1" AllowSorting="true" AllowPaging="true" 
PageSize="10" AutoGenerateColumns="false" runat="server" OnUpdateCommand="RadGrid1_UpdateCommand"   
OnDeleteCommand="RadGrid1_DeleteCommand" AllowAutomaticUpdates="false">
<MasterTableView DataKeyNames="i_UserId" 
EditMode="PopUp" AllowFilteringByColumn="True" Width="100%" TableLayout="Auto">
    <Columns>
        <telerik:GridBoundColumn 
Visible="False" UniqueName="FirstName"   HeaderText="First Name" DataField="s_FirstName" EditFormColumnIndex="0">                                            
        </telerik:GridBoundColumn
        <telerik:GridBoundColumn 
Visible="False" UniqueName="FirstName"   HeaderText="First Name"<BR> DataField="s_FirstName" 
                    EditFormColumnIndex="0"><BR>                                            
        </telerik:GridBoundColumn>
    <Columns/>
    <EditFormSettings 
ColumnNumber="3" CaptionFormatString="Edit details for User: {0}" 
        EditFormType="AutoGenerated" PopUpSettings-Width="70%" PopUpSettings-Modal="true" 
        EditColumn-Resizable="true"  PopUpSettings-ScrollBars="Auto" CaptionDataField="s_Name">                                                
    <FormTableItemStyleWrap="true"></FormTableItemStyle><BR>                                                
    <FormCaptionStyle CssClass="EditFormHeader" ForeColor="Blue"></FormCaptionStyle>                                               
    <FormMainTableStyle GridLines="Both" CellSpacing="0" CellPadding="3" Width="100%" HorizontalAlign="Justify"/>                                               
    <FormTableStyle GridLines="None" CellSpacing="2" CellPadding="2" CssClass="module" Height="110px"/>                                               
    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>                                                
    <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle><BR>                                                
    <EditColumn UpdateText="Update record" ButtonType="PushButton" UniqueName="EditCommandColumn1" CancelText="Cancel edit">                                                
    </EditColumn><BR>                                                
    <FormTableButtonRowStyle HorizontalAlign="Center" ForeColor="Blue" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>                                                                                      
    </EditFormSettings><BR>                                            
    <ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn"><BR>                                                
    <HeaderStyle Width="15px"></HeaderStyle><BR>                                            
    </ExpandCollapseColumn>
  </MasterTableView> 
</
telerik:RadGrid>

And my code behind looks ike this,
      protected void RadGrid1_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;  
            int intUserId = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["i_UserId"].ToString());
            string strLastName = (editedItem["LastName"].Controls[0] as TextBox).Text;
            string strFirstName = (editedItem["FirstName"].Controls[0] as TextBox).Text; 
            ..........
            ..........
            ...........
            }

When debug this, control doesnt move to the above block when i click on upadte button.


Thanks & Regards,
Ash
Ash
Top achievements
Rank 1
 answered on 04 Dec 2010
1 answer
195 views
I'm almost there on this solution. I have a RadGrid that I received assistance with to create RadioButtons in the columns so that only one row value can be selected at a time per column. This works perfectly and now I'm trying to submit the results using an external button so that the values can be saved in the database. All of the rows are put into edit mode when the page loads. The problem is that the update command is only firing for the first row using my code...

Here is the code for the external button
protected void btn_submit_Click(object sender, EventArgs e)
{
    GridItem[] items = RadGrid1.MasterTableView.GetItems(GridItemType.EditItem);
 
    for (int i = 0; i < items.Length; i++)
    {
        int itemIndex = items[i].ItemIndex;
        if (RadGrid1.EditItems[i].ItemIndex == itemIndex)
        {
            (items[i] as GridEditableItem).FireCommandEvent("Update", String.Empty);
        }
    }
 
    RadGrid1.EditIndexes.Clear();
    for (int i = 0; i < RadGrid1.PageSize; i++)
        RadGrid1.EditIndexes.Add(i);
    RadGrid1.Rebind();
}


If I change this line...
if (RadGrid1.EditItems[i].ItemIndex == itemIndex)

so that "i" is the row index I want to submit, I can get the values to submit for that particular row.

I'm not sure why the for loop stops after the first run through though. Using this code, shouldn't it fire off the Update command for each row that it finds? I checked the value of items.Length and got 8 (which is correct...there are 8 rows), so it should run this 8 times and fire off the Update command for row indexes 0-7.

Let me know if I'm not understanding how this works properly...thanks =)
Shinu
Top achievements
Rank 2
 answered on 04 Dec 2010
3 answers
150 views

I am migrating RadTabStrip from older classic  to new Ajax supported version .In the code we are not using css file but used Skin="Outlook".
In new page now its giving extra padding around the text . Attached is the image showing difference between older and new UI.

I have tried following lines of code in css file but still padding is not removed.

.RadTabStrip

 

.rtsOut,

 

.RadTabStrip

 

.rtsTxt,

 

.RadTabStrip

 

.rtsLI,

 

.RadTabStrip

 

.rtsLink,

 

.RadTabStrip

 

.rtsIn {

 

 

padding:0px 0px 0px 0px;

 

 

margin:0px 0px 0px 0px;

 

 

font-size:10px;

 

 

/*background-color:Red;*/

 

 

}


Shinu
Top achievements
Rank 2
 answered on 04 Dec 2010
4 answers
66 views
Not sure if this is even possible with RadGrid, but I thought I'd put it out there to see if this is something that it can do...

I'm trying to create a selection grid where each row would have a person's name in the first column, and then 5 columns representing categories. A person can be selected for more than one category, but a category can only have one person selected.

In trying to think this through, the first thought was that the entire grid would have to put into edit mode with in-place editing...that seems simple enough to figure out. The next thought was how to create a column where the selection in one row de-selects the other rows. Finally, I would need a button that would submit all the rows on the grid.

Do you think this is something that RadGrid can do or should I be looking for a different solution for this type of functionality?

Thanks =)
Philip Senechal
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
48 views
Disregard. . .stupid error on my part.
John Husted
Top achievements
Rank 1
 answered on 03 Dec 2010
7 answers
182 views
Hi! I'm working on a dashboard type web page. I require several RadGrids on it. Now, with all the grids, the page is pretty long in Y-axis. I need to have the grid's collapse using it's caption bar (if possible). I'm in no mood to use AjaxTool:RoundedCornersExtender at this stage. Kindly suggest a way to accomplish this.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 Dec 2010
4 answers
182 views

Greetings

I am to implement ways for improving the performance of my RadScheduler.I cannot bind the control in the client given that one of the requirements of my application is to create a datatable or a dataset dynamically based on the return values.

My RadScheduler binds perfectly, however, performance wise, the scheduler is taking to long to generate the view upon view change. I had an opportunity to read the optimized query example, and I like it a lot. I was thinking to implement something alike by doing a LINQ to Datatable and then binding the RadScheduler control. In this instance, I believe the Datasource_Selecting Event wont be the best choice.

Is it there an available event - say - RadScheduler_BeforeRangeChange or ViewRangeChange - so I could go ahead and bind the control per view instance? 

Say in that event

IEnumerable<DataRow> query =
    from rows in MyDataTable.AsEnumerable()
    where rows.Field<DateTime>("START") > RadScheduler1.VisibleRangeStart AND
    rows.Field<DateTime>("END") < RadScheduler1.VisibleRangeEnd
    select rows;
  
DataTable boundTable = query.CopyToDataTable<DataRow>();
  
RadScheduler1.DataSource = boundTable;


If there not an availabel event ,is there a work around? Also, after the RadScheduler taking too long is returning me the view, but right after error - System.webforms.pagerequestManagerServerError Exception - ViewState Mac Failed

How could I be about fixing these performance issues?

Please let me know,
Thanks


Sergio
Top achievements
Rank 1
 answered on 03 Dec 2010
3 answers
466 views
I would like to ask the knowledgeable people of this forum this:
Given a radcombobox, declared as:
<telerik:RadComboBox ID="SearchComboBox" runat="server" EnableLoadOnDemand="true" AutoPostBack="false"
                    EmptyMessage="Αυτό που ψάχνεις" Width="169px" WebServiceSettings-Path="~/RetrieveHeadlines.asmx"
                    WebServiceSettings-Method="GetHeadlines" Skin="Sunset"
                    EnableItemCaching="true">
 </telerik:RadComboBox>

Given the webservice-declaration:
[WebMethod(EnableSession = true)]
[System.Web.Script.Services.ScriptMethod]
public RadComboBoxItemData[] GetHeadlines(RadComboBoxContext context, int divisionID)

How do I send a value to the "divisionID" parameter?

Thanks in advance: /Christos
Kalina
Telerik team
 answered on 03 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?