Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
244 views
Hi,

I have a problem sorting columns in a radgrid, with null objects in it.
The initial binding is all fine, and no problems.Not untill I try to sort a column with null objects in it.

I programmaticly create the columns like:

 

GridBoundColumn boundColumn = new GridBoundColumn();

 

view.Columns.Add(boundColumn);

 

boundColumn.DataField = "My.Custom.Object"; (note that Custom willbe null at some times, and therefore we cant sort the column).

The error occurs when I rebind the grid in Page_PreRender.

RadGrid1.DataSource = SomeDataSource;

 

try

 

 

 

 

{

 

 

    RadGrid1.Rebind();

}

 

 

 

catch (Exception e)

{

 

    // We will have a "Object reference not set to an instance of an object" error here...

 

}

 

 

Any way to get around this error?

Regards
Andreas Clausen

 

 

Andreas
Top achievements
Rank 1
 answered on 13 Apr 2009
4 answers
69 views
I am filtering a users resource based on the day, only showing the users that are available that day.  On initial display, I get the non filtered resource just fine but I have to go in an load an appointment creation for each day to get each persons previously scheduled appointment.

I have this resource calling a stored procedure and if the default value of 0 is passed then it loads all employees so that should load take care of it does not work.

Any help
Rick
Top achievements
Rank 1
 answered on 13 Apr 2009
8 answers
224 views
Whenever you click on the very bottom of a combobox, it highlights in response to the hover but does not respond to mouse clicks. Several times i experienced this before figuring out what was causing it.

You can replicate by moving your cursor to the very bottom of the combobox. You will see the hover has fired... Now click and see that nothing happens.

I tried other combo boxes to see if this behavior was standard, but it wasn't.
Levi
Top achievements
Rank 1
 answered on 13 Apr 2009
6 answers
195 views
Hi,

first of all I have the following problem:
I use a RadProxy in a Usercontrol. It is not possible to set UpdatePanelsRenderMode declarative on the proxy.
I can set it programatically BUT - this overrides the Manager settings.
So what if I need Inline in my control - but the Controls user wants to have block?

The next problem is really a problem (bug?) - or I do something wrong.
Assume a usercontrol which has 3 controls that should be updated via an async call to the manager.
If I do this inline it would look like this:
<telerik:RadAjaxManager ID="ramManager" runat="server" DefaultLoadingPanelID="alpPan1" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="ramManager">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblCurDir" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblCurFile" /> 
                    <telerik:AjaxUpdatedControl ControlID="imgPreview" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
Now I use these things in a usercontrol - using a proxy.
Therefore I have to set the things in code.
I could do this:
            RadAjaxManager aM = RadAjaxManager.GetCurrent(Page);  
            if (aM == null) {  
                Response.Write("XFileExplorer needs an ajax manager in the page holding the control!");  
                Response.End();  
                return;  
            }  
            //calling ajax function changes grid and hidden fields - so add settings  
            aM.AjaxSettings.AddAjaxSetting(aM, hfCurDir);  
            aM.AjaxSettings.AddAjaxSetting(aM, hfCurFile);  
            aM.AjaxSettings.AddAjaxSetting(aM, rgBackupFiles);  
            aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline;  
 
But this (I gues would be equivalent to):
    <telerik:RadAjaxManager ID="ramManager" runat="server" DefaultLoadingPanelID="alpPan1" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="ramManager">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblCurDir" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="ramManager">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblCurFile" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="ramManager">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="imgPreview" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
So I decided to "block" the things like this:
            AjaxSetting aS = new AjaxSetting(aM.ID);  
            string strLoadPanelID=aM.DefaultLoadingPanelID; //use default loading panel  
            aS.UpdatedControls.Add(new AjaxUpdatedControl(rgBackupFiles.ID, strLoadPanelID));  
            aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurDir.ID,strLoadPanelID));  
            aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurFile.ID,strLoadPanelID));  
            aM.AjaxSettings.Add(aS);  
            aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline;  
 
This works (controls are updated) - BUT I loose Inline Render mode!
No problem for the hidden fields - but a problem with the grid.

My workaround:
            //calling ajax function changes grid and hidden fields - so add settings  
            AjaxSetting aS = new AjaxSetting(aM.ID);  
            string strLoadPanelID=aM.DefaultLoadingPanelID; //use default loading panel  
            //CANT DO THIS - WOULD REMOVE RENDER MODE aS.UpdatedControls.Add(new AjaxUpdatedControl(rgBackupFiles.ID, strLoadPanelID));  
            aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurDir.ID,strLoadPanelID));  
            aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurFile.ID,strLoadPanelID)); //add extra to preserver inline mode  
            aM.AjaxSettings.Add(aS);  
            aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline;  
            aM.AjaxSettings.AddAjaxSetting(aM, rgBackupFiles);  
 

Am I doing something wrong?

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 13 Apr 2009
5 answers
111 views
Hi,
We are planning to utilize the RadHtmlField control in our global intranet project, but I couldn't figur out how to make the height dynamic in similar ways as the out of the box MOSS html field. Based on available documentation, the size can be defined in pixels, but not as dynamic value.

Actual aspnet.ajax editor seems to support this similar ways as the standard MOSS html field as declared in the following article.
http://www.telerik.com/support/kb/aspnet-ajax/editor/expanding-radeditor-s-content-area-vertically-without-using-scrollbars-to-accommodate-all-content-entered.aspx

Functionality is extremely valuable, since otherwise the content editors are having difficulties to understand how the WCM page will eventually look like. Is there some undocumented property setting, which could be applied?
Vesku
Top achievements
Rank 1
 answered on 13 Apr 2009
1 answer
77 views
Hi,
    i have try to popup message when using radgrid with Ajax enabled. after try with command:
RadGrid1.ClientSettings.ClientEvents.OnGridCreated = "alert('test');"
is works but when i try  with :
RadGrid1.ClientSettings.ClientEvents.OnGridCreated = "alert('test\ntest');"   ' (put new line)
window message don't popup and got an error message: Unterminated string constant

This error happened with both IE7 and Firefox

BR,
Kenghot
Georgi Krustev
Telerik team
 answered on 13 Apr 2009
1 answer
168 views
Hi,

I data bind my grid with a DataTable that has a column that holds an object that contains information on that row of data. In the grid I obviously don't display it (Display="false" Visible="false" ReadOnly="true"). When I do an 'Add', I get the 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'AttachmentInfo' error. Does anyone know of a way to get the insert edit panel to ignore this column?

Thanks,
Bruce
Sebastian
Telerik team
 answered on 13 Apr 2009
1 answer
112 views
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/outlookstyle/defaultvb.aspx

In the above example, I would like to make the "Received" column invisible so it's not repeated (since the grouped header already has that information).    How can this be accomplished?   Thanks.
Sebastian
Telerik team
 answered on 13 Apr 2009
2 answers
252 views

In our application we have a Radgrid that contains several GridBoundColumns and a few GridCheckBoxColumns. Here is the code that defines 2 of them:

 

<telerik:GridBoundColumn

    UniqueName="gbcWBSNumber"

    DataField="WBSNumber"

    HeaderStyle-HorizontalAlign="Center"

    ItemStyle-HorizontalAlign="Center" 

    HeaderText="WBS #">

</telerik:GridBoundColumn>

 

<telerik:GridCheckBoxColumn

    UniqueName="gccAllowBoes"

    DataField="AllowBoes"

    HeaderStyle-HorizontalAlign="Center"

    ItemStyle-HorizontalAlign="Center" 

    HeaderText="Allow<br />BOEs">

</telerik:GridCheckBoxColumn>  

 

 

 

We need a way to adjust the settings of these two objects using JavaScript. We are doing this successfully for the GridBoundColumn but not for the GridCheckBoxColumn.

                      

In the following (greatly abbreviated) JavaScript we are able to obtain a reference to both objects(stored in the  global variables WBSNumber  and AllowBOEs  respectively):

 

function WBSGridDoubleClick(sender, eventArgs)

{  

    (code removed…)

WBSNumber   =     MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[index], "gbcWBSNumber");

 

AllowBOES      = MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[index], "gccAllowBOEs");

 

      (code removed…)           

}

 

After some other processing we acquire new values that we need to use to reset these two objects.

 

We have the following JavaScript code in our program to hopefully accomplish this:

 

function OnClientCloseWBSEast(oWnd)

{

    // call a webservice to retrieve the modified data

    WBSData.GetThisWBS(keyValues, OnGetThisWBSComplete);

}

   

// dt is actually an array of strings that contains the

// information we need

function OnGetThisWBSComplete(dt)

{    

        WBSNumber.innerText = dt[0]; // works fine!!!

        AllowBOES.innertext = dt[4] // returns ‘true’ or ‘false’

}

 

Unfortunately, even though the value returned from the webservice in dt[4] reflects the latest change by the user,  the ‘innerText’ property causes the checkbox to be removed and the value ‘true’ or ‘false’ to appear in the cell.

 

We have also tried innerHTML, value, and checked as properties for our CheckBox object but none of these work any better.

 

Can someone tell us what the proper syntax would be?

 

Thanks.

Dan
Top achievements
Rank 2
 answered on 13 Apr 2009
1 answer
178 views

I'd like to change (or possibly remove) the toggle icon (+/- next to the text) on one (but not all) of my TreeViews. Is this possible?

Thanks,

Tommy

Atanas Korchev
Telerik team
 answered on 13 Apr 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?