Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
208 views
I had a problem with radgrid navigation, I am binding a dataset to the grid from needdatasource event. When i use a simple sql statement to fill my dataset I am able to see the navigation bar (which has page size, next page, prev page options) but whenever I use a join statement to fill my datatset I am losing the navigation bar of the radgrid (i dont see the page size, next, prev options at the bottom).

Can anybody help me out from this issue.

Thanks,

Kevin
Pavlina
Telerik team
 answered on 05 Oct 2009
14 answers
331 views
Hello,

When attempting to filter a nullable column, we are seeing a crash when the grid  encounters a null value.

When will this be fixed?

--Details--

System.NullReferenceException: Object reference not set to an instance of an object.

Generated: Tue, 20 May 2008 22:07:26 GMT

 
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at lambda_method(ExecutionScope , VwPortalUser )
   at System.Linq.Enumerable.<WhereIterator>d__0`1.MoveNext()
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
   at lambda_method(ExecutionScope )
   at System.Linq.EnumerableExecutor`1.Execute()
   at System.Linq.EnumerableExecutor`1.ExecuteBoxed()
   at System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression)
   at Telerik.Web.UI.GridDynamicQueryable.Count(IQueryable source)
   at Telerik.Web.UI.GridDataTableFromEnumerable.FillData35()
   at Telerik.Web.UI.GridDataTableFromEnumerable.FillData()
   at Telerik.Web.UI.GridResolveEnumerable.Initialize()
   at Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized()
   at Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields)
   at Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields)
   at Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields)
   at Telerik.Web.UI.GridTableView.get_ResolvedDataSource()
   at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
   at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
   at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
   at Telerik.Web.UI.GridTableView.PerformSelect()
   at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
   at Telerik.Web.UI.GridTableView.DataBind()
   at Telerik.Web.UI.GridTableView.Rebind()
   at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)
   at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
   at Telerik.Web.UI.GridColumn.filterTextBox_TextChanged(Object sender, EventArgs e)
   at System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e)
   at System.Web.UI.WebControls.TextBox.RaisePostDataChangedEvent()
   at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
   at System.Web.UI.Page.RaiseChangedEvents()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.portal_tools_searchusers_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\edis.web.ui\d024371a\2a80559\App_Web_yjh-qi6p.16.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Victor
Top achievements
Rank 1
 answered on 05 Oct 2009
4 answers
163 views
Hello

i have a grid that is dynamically loaded into a RadAjaxPanel, this grid have a edit command which works well in another page in another RadAjaxPanel.
the problem is when i press the edit button on the grid, the grid disappears.
the only difference between the pages is that one contains radajaxmanager (this is the page with the problem) and the other one don't.

Please Help Me..


Pavlina
Telerik team
 answered on 05 Oct 2009
1 answer
101 views
Hello,
I need a way to update the selected grid row values using the clientside api.  I can read the values just fine, but, I need to be able to write to the cells.  Also, I don't neccessarily need to take the grid into edit mode or want to.  I'm selecting a grid row, updating the values on the form and pressing save.  On save I want to update the selected row without having to rebind the grid. 

I can get the GridIItem using the "get_selectedItems() call, but then what? 

Any Ideas with examples would be great..

chris
Veli
Telerik team
 answered on 05 Oct 2009
6 answers
161 views
Hi,

I have an issue with RadEditor version 4.5.3.0 using snippets on a Sharepoint 2007 site. We have added snippets to the tools file and can see these in the dropdown, when I select one however I get the message : 'Could not find the command InsertSnippet - Please update your command list'.

We have this working fine on our production environment fine but we have now created a staging environment for future work and have this issue. The tools and config files are copied from production so are the same.

My initial thoughts were that this was a licensing issue, as I know snippets are not available in the lite version. However I can use strikethrough which I understand is also unavailable in the lite version.

Can you firstly please confirm that 4.5.3.0 is the fully fledged version, or if this assembly version could be either, how can I tell if I have the fully fledged version?

Assuming I have, can you suggest why it cannot find the command?

I can see some references to this command within the Telerik .js files, I can also reflect on the assemblies and see some stuff relating to snippets, but strugling to marry them up. Can you suggest what I should be looking for and checking to make sure this command is actually present and the editore can find it?

Rich
Tony
Top achievements
Rank 1
 answered on 05 Oct 2009
1 answer
434 views
Hello there,
I have a UserControl that i am trying to use as edit form for a RadGrid. The UserControl has some controls inside that perform postbacks (such as a RadComboBox changing the value of a RadNumericTextBox on SelectedIndexChanged), however I ajaxified this using a RadAjaxManagerProxy and adding the combobox as initiator and the same combobox and the textbox as updated controls.

In the NeedDataSource handler of the grid, i set the DataSource property with a collection of objects and in the ItemDataBound handler for the grid, if the item is in edit mode, i set some properties of the UserControl, including the one which stores the id of the object to be loaded.

This is the code for the two handlers:
protected void grdRelated_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        grdRelated.DataSource = GetGridDataSource(); 
    } 
 
protected void grdRelated_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditFormItem &&  e.Item.IsInEditMode) 
        { 
            IAssignControl ctrl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as IAssignControl; 
            if (ctrl != null
            { 
                AssignedProduct assignedProduct = (e.Item as GridEditFormItem).DataItem as AssignedProduct; 
                ctrl.EntityType = "Opportunity"
                ctrl.BOId = "86cc5561-d769-4b77-b51e-386e989de0ae"
                ctrl.InAssignMode = false
                ctrl.AssignedProductID = assignedProduct.UniqueID; 
                ctrl.Refresh(); 
            } 
        } 
    } 

ctrl.Refresh() calls a method inside the UserControl which redraws the inner controls, as they are dynamically added to the UserControl.

When the edit button inside the grid is pressed, putting the row in edit mode, everything works ok and the UserControl is loaded properly. However, let's say i change the selection of a combobox inside the UserControl. As i said, this needs to update a textbox in the same user control according to the new selection. Though the combobox would normally trigger a postback and refresh the whole page, textbox included, as this is ajaxified using the RadAjaxManagerProxy defined inside the UserControl, i would expect only the textbox to be updated and no action performed on the other inner controls or the radgrid having this UserControl as edit form.

What actually happens is that somehow, the NeedDataSource event is fired again, reloading the grid data source, which then triggers a Rebind on the grid, which then goes into ItemDataBound, reassigns the UserControl properties and triggers the ctrl.Refresh() which redraws the inner controls. At this point, the inner controls are re-created according to the initial data, while the ViewState contains the modified data, leading to a mismatch between the saved state and the current state. Bingo, corrupted ViewState error.

What i don't understand is why an ajax request inside the UserControl leads to the containing grid firing its NeedDataSource event. The way I see it (please correct me if i am wrong with this), the ajax request should only update the controls specified in the RadAjaxManagerProxy settings, not the whole grid. Have i made any mistake in approaching this? If so please shed some light on this matter as I have no idea how to get past this.

While browsing the other forum threads, i came across THIS thread, which seems related, though i cannot say for sure it's the same problem i'm experiencing.
Veli
Telerik team
 answered on 05 Oct 2009
1 answer
95 views
I am trying to create a custom dialog. I first tried the example given here

http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx

and I got it working.

Then I swapped in my own aspx page and tried to hook it up in the same way. My aspx page is a frameset with 2 frames. The "submit" button is on the first frame. On this page I added the javascript to close the dialog and return a value. This is not working and the dialog stays open.

I traced the problem to the javascript function getRadWindow().

function getRadWindow()
  {
    if (window.radWindow)
    {
        return window.radWindow;
    }
    if (window.frameElement && window.frameElement.radWindow)
    {
        return window.frameElement.radWindow;
    }
    return null;
  }

It is returning null as both if statements resolve to false. I have dug around with Firebug to see if I can find a way to get the Rad Window but to no avail. Any ideas on how can I get this function to work when it is called in a frame in the dialog?

Rumen
Telerik team
 answered on 05 Oct 2009
2 answers
114 views
Hi

How can I bind the whole Container.DataItem to my Control in the FormTemplate? I have a UserControl for editing my object (in this case Person) and would like to reuse this in the EditFormSettings of the RadGrid but can't achieve this in a TwoWay mode. 

My code so far:
  <EditFormSettings> 
                <FormTemplate> 
                    <uc:GridButtons ID="GridButtons2" runat="server" Position="Top" />     
                        <data:PersonPanel runat="server" ID="PersonPanel" DataSource='<%# Container.DataItem %>' 
                            AddCss="panel" GroupingText="Personendaten"  />               
                    <uc:GridButtons ID="GridButtons1" runat="server" Position="Bottom" />       
                </FormTemplate> 
            </EditFormSettings> 

GridButtons is just a UserControl with the Edit/Canel buttons (top and bottom) whereas PersonPanel is my control which takes a Person object and gives a Person object back (DataSource Property). The Propblem is that the Container.DataItem expression is only OneWay, how could I achieve this in both ways so the RadGrid gets the updated Object back?

Thanks for help!
Softec
Top achievements
Rank 1
 answered on 05 Oct 2009
1 answer
102 views
I have been looking at the example of the RadGrid editing with a UserControl. I am not sure how to bind the values to the UserControl fields. Is this done automatically some how? How are the values passed across to to do the initial bind when the row is selected in the grid?

I notice that there is some code like this but I don't understand how it is getting used to do the binding:

public object DataItem 
        { 
            get 
            { 
                return this._dataItem; 
            } 
            set 
            { 
                this._dataItem = value
            } 
        } 

Veli
Telerik team
 answered on 05 Oct 2009
3 answers
115 views
I'm having a hard time understanding the demo of Load on Demand (http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultVB.aspx). Primarily, how the productid is passed into the UC. I see it on the manager.targetcontrols.add line in defaultvb.aspx.vb, but I'm failing to see how the UC gets that value. Is it the last 2 lines in UpdateToolTip sub? What is the function of those lines? If you could explain the process a little bit, it would be greatly appreciated!

Also, can you pass more than 1 thing from the tooltip into the UC?

Using version 2008.1.515.20
Nik
Top achievements
Rank 1
 answered on 05 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?