Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
141 views
Hi

I need a 'sexy' way to duplicate rows from a grid into the same grid. I thought drag and drop, but the examples show 2 grids. Does anyone have any other ideas.

Andy
Andy Green
Top achievements
Rank 2
 answered on 03 Jul 2009
1 answer
245 views
Hi,

I've got a column which dispalys the number of days an item has been in stock. I've implemented this as as GridTemplateColumn with a label for the ItemTemplate. I couldn't use a GridCalculatedColumn as this does not work with dates. The code in the ItemDataBound event is as follows:

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem dataItem = e.Item as GridDataItem;

 

 

Label label = (Label)dataItem.FindControl("DaysInStock");

 

label.Text =

DateTime.Now.Subtract(DateTime.Parse(dataItem["DateIntoStock"].Text)).Days.ToString();

 

}

I also want to be able to sort on this column. How can I implement this?

Thanks,

Stuart

Yavor
Telerik team
 answered on 03 Jul 2009
1 answer
105 views
I'm using a grid that has its EditMode set to EditForms. Is it possible to actually move the Update and Cancel buttons from their default location? Below is a link to a screenshot of what I mean - 

http://i970.photobucket.com/albums/ae187/paulehn/grid-movebuttons.jpg

Ideally, I'd like to be able to move them to the top right hand corner of the form, but if that is not possible, simply moving them to above the form controls would be fine (ie. top left hand corner).
Shinu
Top achievements
Rank 2
 answered on 03 Jul 2009
1 answer
92 views

Is it possible to control the order of the groups on the grid, or disable grid's ordering mechanism and just display it in the order data is fed to the grid. Unfortunatelly, domain entities are fed directly to the UI and they do not have any meaningful attribute upon which to set the group expression. Here is how the data is being fed to the grid, and I would like the grid not to change the order.

   this.BaseProductBenefitsGrid.DataSource = Benefits  
                   .OrderBy(b => 
                   {  
                       switch (b.BenefitServiceGroup)  
                       {  
                           case "Inpatient":  
                               return 1;  
                           case "Outpatient":  
                               return 2;  
                           case "Other":  
                               return 3;  
                       }  
                       return 4;  
                   }).ThenBy(b => b.Type.DisplayOrderNumber).ToList();  
 
                BaseProductBenefitsGrid.DataBind(); 


and here is the group expression

    <GroupByExpressions> 
                        <telerik:GridGroupByExpression > 
                            <SelectFields > 
                                <telerik:GridGroupByField HeaderText="-" FieldName="BenefitServiceGroup"  HeaderValueSeparator="&nbsp;" SortOrder="None" /> 
                            </SelectFields> 
                            <GroupByFields> 
                                <telerik:GridGroupByField FieldName="BenefitServiceGroup" /> 
                            </GroupByFields> 
                        </telerik:GridGroupByExpression> 
                    </GroupByExpressions> 

so I would think that it should be possible to have groups ordered as Inpatient, Outpatient, Other. But grid reverses it and displays it as Inpatient, Other, Outpatient.
Princy
Top achievements
Rank 2
 answered on 03 Jul 2009
1 answer
146 views
Hi,

I have a issue with the radtextbox control. I have some placed inside an usercontrol. On my parent page, I have a button which when clicked call a method in my usercontrol that reads the text properties of the input controls. The property is empty if I use the radtextbox. If I switch to the asp.net version I can use the property values. What I haven't understood?

Thnx,
Adi
Shinu
Top achievements
Rank 2
 answered on 03 Jul 2009
1 answer
151 views
Hi,

I'm using the same radWindow for two different display; one longer than the other.

I was wondering if it was possible that the radWindow auto-resize itself.

Thanks,

Phil
Shinu
Top achievements
Rank 2
 answered on 03 Jul 2009
1 answer
100 views
Hi -

I have a data item that I would like to compare to a column's value for every row in the grid.  When there is a match, I would like to set column's corresponding row's selected property to true.  (Server side code)

the pseudo code would be

For each grid(row) in mastergrid
    when activityid == grid(row).Column(activityid.value) 
         set the grid(row) selected.property = true.
         quit

Could you provide a code example of how this can be accomplished?
Thanks
Princy
Top achievements
Rank 2
 answered on 03 Jul 2009
16 answers
608 views
Hi

I have a required field validator attached to a rad date picker to make sure the user enters a date. The problem is that if the user enters an invalid date like 32/4/2008 the required field validator is 'activated' even though it shouldnt be and my error message 'date required' is displayed. How can i stop invalid dates triggering the required field validator

thanks
Phil
Top achievements
Rank 2
 answered on 03 Jul 2009
2 answers
108 views
How can I stop the GridHTMLEditorColumn from showing the rendered HTML when the rows are displayed in the Grid?  If I have links to images within my HTML in the cell, it renders and adds to load time.  I would like to only display the HTML code in that cell.  So for example, even in the case of the cell containing the HTML: <strong>Test</strong>.  I would like the cell to contain <strong>Test</strong> rather than rendering the HTML and ending up with a bolded "Test".  Thank you!
Todd
Top achievements
Rank 1
 answered on 03 Jul 2009
4 answers
128 views
Hi,

Is there a way to display grid lines while in edit mode for RadGrids? I have seen a few forum posts mentioning this, but the solution wasn't very clear to me and didn't really show how you go about it.

Help on this issue would be greatly appreciated.

Regards,

Luke
Peter
Top achievements
Rank 1
 answered on 02 Jul 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?