Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
76 views

Using the ASP.NET grid, I had a page that persisted client-side selection, using this example:

http://www.telerik.com/community/code-library/submission/b311D-khchg.aspx

After upgrading to the AJAX control, this page now errors, due to Javascript choking on:

function

GridCreated(){
grid =
this;
var pageIndex = grid.CurrentPageIndex.toString();

...specifically, "grid.currentPageIndex is null or not an object".

Suggestions?

Bill

Yavor
Telerik team
 answered on 14 May 2008
13 answers
606 views

I have a radtreeview inside radcombobox. My treeview is populated on demand. This combobox resides inside formview which is by default in edit mode. And i have an objectdatsource that contains the select and update mode.

The problem with my update mode is, the selected value of combox always becomes 0 it doesn't change even when using combo.set_value("something");
In client side the value changes but not in server side even when trackChanges() and commitChanges() is applied.

The following link contains the type of solution but its not working, with my q1 2008 415 version. it has a special parameter called <telerik:AjaxComboValueParameter />. Wouldn't it be better if that parameter would be provided by Telerik instead of trying to code it.
http://www.telerik.com/community/code-library/submission/b311D-ttdgm.aspx

Following is my javascript file for setting the value of the combobox when selecting a treenode. My objectdatasource update parameter contains <asp:ControlParameter Name="parentId" Type="Int32" ControlID="cbo" PropertyName="SelectedValue" />. The name of my radcombox inside formview edit mode is cbo and treeview is radPortalsTree.

function
radTreeViewPortalParent_OnClientNodeClicking(sender,eventArgs)

{

var comboBox=$find('<%=FormViewPortal.FindControl("cbo").ClientID%>');

var node=eventArgs.get_node();

var portalTree=$find('<%= radPortalsTree.ClientID %>');

if(portalTree.get_selectedNode().get_value()!=node.get_value())

{

comboBox.trackChanges();

comboBox.set_text(node.get_text());

comboBox.set_value(node.get_value());

var cboItem=comboBox.get_items().getItem(0);

cboItem.set_value(node.get_value());

comboBox.commitChanges();

}

comboBox.hideDropDown();

}

Veselin Vasilev
Telerik team
 answered on 14 May 2008
12 answers
344 views
On my site I'm using the telerik radeditor to allow the user to create a message and then preview it in the browser by storing it to a database for a temporary amount of time. However when the form is submitted, the value from the editor which is stored in the database is the same value as when the page loads. Therefore the value being stored in the database is blank. Why is this?
Rumen
Telerik team
 answered on 14 May 2008
1 answer
140 views
We have a use case which is to take massive quantities of information by column. Your control (RadGrid) allows editing by rows and not by columns.  Do you plan to offer a data-entry column mode?  With a cursor deplacement by cell?
Like excel?  Have-you any suggestion on how to achieve this functionality.

Princy
Top achievements
Rank 2
 answered on 14 May 2008
4 answers
200 views
Hello,

I am writting an application that uses javascript to call an Ajax_Request through the ajax manager.  We used to do this by using -

window[

"<%= RadAjaxManager1.ClientID %>"].ajaxRequest(srcElement);

the srcElement being the argument we are sending (usually a string).

Unfortunately with the upgrade to the q1 08 this is no longer working and just coming back with a javascript error saying that RadAjaxManager1 is null or not an object.

i have also tried -

var AjaxMan = Document.GetElementByID("<%= RadAjaxManager1.ClientID %>");
AjaxMan.ajaxRequest(srcElement);

Is there a new way to call the ajax request in javascript??

Ian
Top achievements
Rank 1
 answered on 14 May 2008
1 answer
124 views
Hi,

Besides the data in the RadGrid, Is it possible to export some additional information also in the excel sheet? If yes, then how?

Sonia
Shinu
Top achievements
Rank 2
 answered on 14 May 2008
2 answers
181 views
I (like several other people in this forum) am trying to customize Scheduler using an ObjectDataSource. I read in another thread that Telerik has decided not to implement a Dataitem property because CustomAttributes makes it obsolete. First of all, I find this a bit confusing, as Dataitem is pretty standard, not only across .Net controls, but also across Telerik controls. The departure from a standard that most people pretty much expect is a strange choice, IMHO. In addition, CustomAttributes actually seems to create (a bit) more coding, as developers have to add the attributes to the customattributenames list, and then access the individual attributes. With Dataitem, I just have to cast the object, and the properties are already there ready to be accessed by name. Again, a bit of a strange (and from my perspective, disappointing) choice, in my opinion.

But to the point- The object list I am binding to has member objects whose properties I need to access on Appointment binding. For example, I have roughly the following:

>Event
>>Person
>>>First Name
>>>Last Name
>>Business
>>>Name
>>>Street

and so on. In order to access the Name property of Business, I assumed (and tried) using Business.Name as a custom attribute name. Then on AppointmentDataBound, I tried to access the value via e.Appointment.Attributes("Business.Name"). From what I have seen in the examples, it seems this ought to work, but for some reason for me it just doesn't. I know the objects exist and have data in their properties- I just can't access them.

I am probably missing something obvious here, but I am just not getting it. Any help is greatly appreciated.
Corey Alguire
Top achievements
Rank 1
 answered on 14 May 2008
7 answers
303 views
Hi. My English is not good, but I will try to explain

problem #1
I'm working with website. URL doesn't changes during nagivating (url is storing inside the session at server side as inner url; inner url changes using special postbacks). ViewState is disabled. Ajax is in use widely

I have a lookup (drop down list) with button 'Edit' near it. On pressing 'Edit' button system shows (using AJAX) Telerik Grid  with Lookup's values to edit. Grid is inside of UpdatePanel
Firstly I tryied to use edit column:

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"/>

System goes to Edit mode well - I getting required events at server side (OnEdit, OnItemCommand).

Problems occurs when I try to do actions while I'm in edit mode - press Update or Cancel buttons. System fires no Grid's events. Looks like databiding 'loosing' edit state data (without databind system will not show Grid at all)


problem #2
I tryied to move to edit mode manually

<

telerik:GridTemplateColumn UniqueName="EditColumn">
<ItemTemplate>
    <asp:LinkButton ID="lbEdit" CommandName="ComEdit" runat="server" Text="Edit" />
    <asp:LinkButton ID="lbUpdate" CommandName="ComUpdate" runat="server" Text="Update" Visible="false"/>
    <asp:LinkButton ID="lbCancel" CommandName="ComCancel" runat="server" Text="Cancel" Visible="false"/>
</ItemTemplate>
</
telerik:GridTemplateColumn>

At server side I'm handling visibilty of these link buttons as well as moving/exiting edit mode
Problem is in getting edited values. I trying to get updated values in 'OnItemCommand' event. 

Telerik.Web.UI.

GridDataItem dataItem = e.Item as Telerik.Web.UI.GridDataItem;

string s = dataItem["ID"].Text;

However all values are "&nbsp;". Without databinding no values at all

I checked Forms data, edited values are there
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl01"] - 'Name' column
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl02"] - 'Description' column
this.Page.Request.Form["ctl03_ctl03_ctl01_ctl00_ctl03_ctl1~0_rgEditGrid_ClientState"] - is empty

However Unique ID's are differs:
dataItem["Name"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl04" string
dataItem["Description"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl05" string
dataItem["ID"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl03" string


So I have only 2 ways for now (I will try to do them in nearest time).
1) Create EditTemplate for Name and Description, with named controls. And try to search them directrly for values (I not sure they are exists there...)
2) Manually get data from Page.Request.Form data... Yes, thats not good

Do you have some comments/recomedations about these problems?
Telerik Grid is extremely powerful control, but it still unripe is some 'special' situations
Sergey
Top achievements
Rank 1
 answered on 14 May 2008
1 answer
157 views
Hello,

I need to pass a query string to a rad window and then open it.

I have 1 button that, when clicked, it creates and sets the correct navigateUrl for the radwindow but I then want the window to open - so the user only has to click 1 button - I could have 2 buttons - 1 to generate the correct navigateurl and then get the user to click a second button but that's not really very good.

I need a way of setting the querystring values on the server and then invoking the window to open - all in 1 hit.

Is this possible?

Thanks.
Georgi Tunev
Telerik team
 answered on 14 May 2008
4 answers
195 views
hi,

I generate chart dynamically & after chart generate I want to Print that chart ..
so any body tell me how to Print chart ???
shah
Top achievements
Rank 1
 answered on 14 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?