Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
92 views
Do you know how to change the Headers in my Details Tables based on a DataKeyValue in my MasterTable?

This does a great job changing the header in the ItemDataBound Event but I can't seem to retreive the DataKeyValue in the Master Table.  When I go to expand and error is thrown.

grdMSC.MasterTableView.DetailTables[0].Columns[1].HeaderText = "Equipment";

 

 

grdMSC.MasterTableView.DetailTables[0].Columns[2].HeaderText = "Vendor";

 

Shinu
Top achievements
Rank 2
 answered on 10 Jun 2011
5 answers
264 views
Hi,

I have two GridDateTimeColumns in a telerik grid--one the start date and other the End date. Now I want a 3rd column which would calculate the difference between the 2 columns.


 <telerik:GridCalculatedColumn Aggregate="Custom" DataType="System.TimeSpan" DataFields="DATE_EXPIRED,TRIAL_REQUEST_DATE" Expression="{0}-{1}"  UniqueName="column"></telerik:GridCalculatedColumn> 
                          
<telerik:GridDateTimeColumn DataField="DATE_EXPIRED" DataFormatString="{0:d}"  HeaderText="Expired" UniqueName="DATE_EXPIRED" ></telerik:GridDateTimeColumn> 
 
<telerik:GridBoundColumn DataField="TRIAL_REQUEST_DATE" HeaderText="Requested" SortExpression="TRIAL_REQUEST_DATE"  DataFormatString="{0:d}" UniqueName="TRIAL_REQUEST_DATE">   
 </telerik:GridBoundColumn> 


I get the following error:

Cannot perform '-' operation on System.DateTime and System.DateTime.

What parameters should I be using in the Expression attribute to achieve this? any ideas?


Thanks,
Ketan
William
Top achievements
Rank 1
 answered on 10 Jun 2011
4 answers
130 views
With the solution in place for the previous issue (see below), we are now experiencing the failure of the RadGrid "cancel" button to hit the server side.  I can add an OnClientClick attribute to the asp:Button control to fire a JavaScript alert, but the server side Grid_ItemCommand (and even Page_Load) handler breakpoints are not being hit.  Any thoughts would be greatly appreciated.  Thank you.  Version 2010.3.1109.35

Previous Issue: http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-insert-edit-fails-validation-cancel-tab-change.aspx
THOMAS
Top achievements
Rank 1
 answered on 09 Jun 2011
3 answers
135 views
Hi

Is there a way to get the MIME, Content Type and file name from the grid binary image when uploading a file to a database?
Grant Millgate
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
64 views
so i have my grid change the height on pane collpase using the function applyHeight below on the onclientcollapsing on radpane
function applyHeight(sender, args) {
                    var grid;
                    // set height to the whole RadGrid control
                    grid = $find("<%= grid_Historical_Commodity.ClientID %>");
                    grid.get_element().style.height ="580px";
                    grid.repaint();
                }

however when i click page 2 on the grid, the height of the grid went back to original height. so how do i keep the height of the grid the same after i collapse? thank you.
Gimmik
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
105 views
what i am trying to do is create a multi tiered radgrid that looks similart o this concept

the 1st line of grid would hold Personnel information, then I want to make 3 sub grids of this that are dental, medical and admin.
Then under these it would hold the records for those categories, is this type of grid possible

Personel information   1level
    Dental  Count of records and ID   2nd level
        All Dental records asssociated with personnel   3rd level
    Medical Count of records and Id   2nd level
        all medical records associated with personnel   3rd level
    Admin Count of records and ID   2nd level
         all admin records   3rd level
Fortune
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
89 views
Hi,

How to set the height of the grid row so that each row can show 2+ lines? No need to be determined the height dynamically.


Thanks,
Elton
Gimmik
Top achievements
Rank 1
 answered on 09 Jun 2011
5 answers
338 views
Hi

I have a ComboBox filter in a grid that has an 'All' state, which is the default.

I have written some client side code to invoke a filter operation on my grid, and it filters
just fine if I select.

However after the postback occurs my Combo has the 'All' item selected.

So I can never trigger a client side event to revert my grid to unfiltered.

Helpppppppp
Gimmik
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
96 views
I have a project were we have the RadAjaxManager on the MasterPage. The MasterPage declares functions that are attached to the RadAjaxManager's OnRequestStart and OnResponseEnd client events.

No problem so far.

On an individual page in the project I find myself needing to assign a function to the OnResponseEnd event. If I do this, I'm going to lose the regular handler for that page, aren't I?

Is there a properly defined way of chaining these handlers?

-- 
Stuart
Fortune
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
50 views
Hi guy,

I have a little problem. I'm using a hierarchy grid. The "parent" grid show the roles in my table aspnet_Roles. The nested grid show the user related to the role. For populating my grid, I'm using a dataSet. My problem is that I don't know how to delete the relation between a user and a role using a context menu. I tried the seconde example on this page, but I still have some problems. In fact, this is how I do :

string[] args = Request.Form["radGridClickedRowIndex"].Split('_');
int indice = Convert.ToInt32(args[args.Length - 1]);
string UId = Request.Form["radGridClickedTableId"];
 
GridTableView tableView;
 
tableView = this.Page.FindControl(UId) as GridTableView;
string userName = ((tableView as GridTableView).Items[indice] as GridDataItem)["UserName"].Text;
string roleName = ((tableView as GridTableView).Items[indice] as GridDataItem)["RoleName"].Text;
 
Roles.RemoveUserFromRole(userName, roleName);
 
tableView.Rebind();


When I tried it, this message appears :  Cannot find a cell bound to column name 'RoleName'

The only way I find to correct this problem is to add the column RoleName to the nested grid, but I don't really like showing the name of the role for each user. So, is it possible to find to which row the nested grid is related and access his data (in my case, RoleName). 

Thank you,
David Lefaivre-B.
David
Top achievements
Rank 1
 answered on 09 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?