Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
292 views
I've got a grid where multiple rows can be selected. Once the user has selected the information on the grid, I need to cycle through all the selected items to get the datakeys values.

Tried the following in the button event
cId = RadGrid1.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(0).ItemIndex)("CompilationId") 
 which returns no data (expecting a Guid)

however, doing the following does return a value
cId = RadGrid1.SelectedValues("CompilationId") 

But that only works for a single row selection. What I am trying to do is similar to the following
'Get number of selected items  
selectedItems = RadGrid1.SelectedItems.Count -1  
 
'Get value of DataKey for each selected row  
For i As Integer = 0 To selectedItems  
    cId = RadGrid1.SelectedItems(i).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(i).ItemIndex)("CompilationId")  
    'update the information  
    'loop or exit  
Next 

Something like that... could anyone help (a little time senitive).

Thanks
Q

Quintin
Top achievements
Rank 1
 answered on 01 Mar 2010
4 answers
121 views
I have set up a RadGridTemplateColumn with a RadComboBox in the EditTemplate.  The grid is part of a large form that needs to be loaded in a RadWindow.

When I go to edit mode on the grid item, then try to click on the combo box, the items are popped up outside of the window bounds (scrollbars are created so I can scroll to the popped up items).  This only happens in IE8 (IE7 compatibility view).

I found the KB article about adding some style elements to adjust the combo box positioning, but when I do that, the combo boxes completely stop working in Firefox.

Here is the basic structure:

 ** Inside RadWindow **
<
asp:form> 
  <asp:usercontrol> 
    <telerik:radajaxpanel> 
      <telerik:radgrid> 
        <telerik:gridtemplatecolumn> 
          <telerik:radcombobox> 
     
Any ideas how I can get it to work on both browsers?  FYI everything works great when NOT in a RadWindow.

Thanks!


Georgi Tunev
Telerik team
 answered on 01 Mar 2010
1 answer
160 views
hi

I would like to create the columns based on the date.

For example, it is now march and i would like my grid to show 31 columns

01/03    02/03    03/02 all thru 31/03

So when the system date detect it is already 1st april, my grid would create 30 columns

01/04    02/04    03/04    thru 30/04

On conclusion, the grid should create the number of columns based on the number of days in a given month. How should i go about it?

I would like to create an attendence sheet where the rows are the people and the columns are the dates. Thanks
Shinu
Top achievements
Rank 2
 answered on 01 Mar 2010
1 answer
157 views
All,

I know this one is a simple one, but for the life of me I cannot find the answer.

1) Have a rad grid populated w/ one hyperlink column.
2) The value is bound to a date of a .pdf doc
3) I want to open the .pdf doc in a new window.
4) I cannot seem to be able to pass the doc created date, which is the value of the hyperlink column.

Any ideas?

Thanks, Kevin
Princy
Top achievements
Rank 2
 answered on 01 Mar 2010
3 answers
284 views
Hi,

When I create a table in the radeditor control, I added a standard css class to my table.
In the beginning everything looks fine, but when I'll do a 'check in' of my page the styling
of my table is gone. Sometimes after a checkin it's fine, but when the page will be copied to
all the other languages the styling of my table is gone again.

When i look into the html code from my page  i see that the css has been changed.

When the page looks fine the css classes between the style tags look lik this:

     .telerik-reTable-2 { ... some styling ... }

But the css classes after the checkin looks like this: 

    .ExternalClass  .telerik-reTable-2 { ... some styling ... }

So .ExternalClass has been added to all the other classes, so this is the reason why the styling is gone from my table.

I hope someone has a sollution for this, because this bug is really annoying me.
Stanimir
Telerik team
 answered on 01 Mar 2010
3 answers
146 views
Hi Admin,

We are kinda new with using telerik. We are using a rad editor that overwrites the html type of field in moss. The requirement in our editor is that, on click of a custom toolbar button, it would insert/paste a piece of html code. But before that, there should be some sort of checking on where the current selection is. Meaning, the piece of html code to be inserted should only be pasted at specific types of elements (determined by their classes). I'm a having a hard time trying to navigate the dom and controling the position where i want to paste it. I want it to be pasted not just on the selected element, but maybe in its child nodes or sibling nodes.

Could you provide an example or references on what methods to combine or use in able to achieve this?

Thanks for your help!
ryan
Stanimir
Telerik team
 answered on 01 Mar 2010
2 answers
106 views
Hello,

I'm in the process of putting together a rad grid which contains approx 28-30 columns, and I need to change the column headings for 25 of the columns dynamically.

I have managed to sort the renaming when it's just showing the data, but when it goes into edit mode, using the "EditForms" mode, the titles revert back to the original coumn names.

E.g:

In the grid, I have a column called "Group 1", which gets renamed to "UK", but when it goes into the Edit Form, it goes back to "Group 1".

If you can give me any pointers, I would be very greatful.

Thank you

Dave
Dave
Top achievements
Rank 1
 answered on 01 Mar 2010
2 answers
141 views
hi all,
on ItemInserted and ItemUpdated events we can use:
e.KeepInInsertMode = True
and
e.KeepInEditMode = True
where e is defined as 
Telerik.Web.UI.GridInsertedEventArgs
or 
Telerik.Web.UI.GridUpdatedEventArgs

but in my case i'm using InsertCommand and UpdateCommand, which use e as GridCommandEventArgs
and i need in a particular condition to keep the item in insert/edit mode, how can i do this??

thnx in advance
FreshOne
Top achievements
Rank 1
 answered on 01 Mar 2010
1 answer
73 views
Hello,
I'm trying to implement an ajax solution, but having done SL for 2 years it's hard for me.... maybe I've lost something...
my question is : To correctly have a detail view binded to a datasource I need the data in this form :

  [DataContract] 
    public class Utente 
    { 
        [DataMember] 
        public string Codice { get; set; } 
        [DataMember] 
        public string Descrizione { get; set; } 
        [DataMember] 
        public string PWD { set; get;} 
        [DataMember] 
        public string Filiale {get;set;} 
        [DataMember] 
        public List<Gruppo> GruppiAppartenenza { get; set; } 
 
    } 

Or Having them Plain (No List<Group>) but [DataMember] int idgruppo.... [DataMember] string descrizione?

How ho I remove from showing the similar row in the second case?

If I've

Paolo | 1 | Home
Paolo | 0 | Office

How do I show only one "Paolo" and the detail with Home Office?

Thanks in advance
Paolo

Yavor
Telerik team
 answered on 01 Mar 2010
1 answer
48 views
consider the following example: http://demos.mcmscontrols.com/ASPNET/Grid/Examples/DataEditing/AllEditableColumns/DefaultCS.aspx

I have the same requirement with one exception,  when the value in "Supplier" ComboBox changes,
"Category" should have a different set of options (according to the selected value in "Supplier"),
while values in other controls must not change.

can it be done?

Princy
Top achievements
Rank 2
 answered on 01 Mar 2010
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?