Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
Hi guys,

I am stucked..I m looking for code which can Total a column on a event like "column  click" .. I was able to get footer total 
by PLACING IN ITEM DATABOUND

 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
             GridFooterItem footerItem = (GridFooterItem)e.Item;
     
            var total =Convert.ToInt64(objbal.ExecuteStringQuery( "select TTotal from  TAB1"));
           
           
            footerItem["Total  Capacity"].Text = "Total   Capacity: " + total.ToString() ;
}

i WANT TO DISPLAY COLUMN total on clicking header column  on grid.. Any sol..plzz..?
Casey
Top achievements
Rank 1
 answered on 15 Dec 2011
1 answer
143 views

RadImageEditor does not accept width in percentage.

In my project I am having a rad Panel within which I have a user control which contains a RadGrid. This rad grid has a NestedViewTemplate which contains <td> <tr> formation with a single row and two <td>’s I have given 50% width to each of these <td>’s and each of these <td>’s contain another user control which contains a RadImageEditor control with width as 100%. But when I run my code the Image control goes out of its parent element. Is there a way to fix this issue?

Dobromir
Telerik team
 answered on 15 Dec 2011
4 answers
218 views
Hi.
    I am using simple pager in RadGrid. But this pager is displaying in two rows instead of in one row
    I am using
                 <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Position="Top" AlwaysVisible="true" ></PagerStyle>

    Actually it should display like(Only in single row)
     " Change page:<1>                                        Display page 1 of 1, items 1 to 3 of 3  "
    
    But displaying like(two rows)                                          
       " Change page:<1>                                      
         Display page 1 of 1, items 1 to 3 of 3  "

    Please help me

    Thanks
    Srikanth Gunnala
Edmond
Top achievements
Rank 1
 answered on 15 Dec 2011
3 answers
194 views
Hi,

I am using RadUpload with ajax enabled. so in server side i am using the code RadUpload1.UploadedFiles.Count   so result always comes 0.

How to get file in server side with ajax enable.  please give me a tips for this one.


Thanks,
Dhamu.
Bozhidar
Telerik team
 answered on 15 Dec 2011
1 answer
134 views
Hello,
What we are doing i,s we have a set of different data extracts we want to do into excel.

We have a radcombobox that contains the list of these different data extracts.

We choose one from the list and click on Extract data button and we populate a hidden datagrid and then export to excel from there.
It prompts if we want to open the file or save.
We choose to open the file check the data and we close the excel file. Select another item from the combobox and repeat the steps.
It all works fine.

But when we do not close the open file and choose another item from the combobox and then export to excel, the whole thing freezes.

I guess because the excel is already open.

Is there any way out of this.
i.e. can we continue doing exctracts without having to close the previous excel?

Also, We want to be able to select multiple items from the combox and do the extract at the same click.
Is there any easier way to do it?

Thanks.
 

Andrey
Telerik team
 answered on 15 Dec 2011
3 answers
116 views
Hi,

When using the UseStaticHeaders property (set to true) the treelist can look really good however I have noticed that if the content of the tree list is less than the height of the available page then the last row does not ave a line on it.  See the attached image for an example.  

This doesn't matter if the number of items goes beyond the height of the page as there is never the white space to see the missing line.

Could this be added for a fix please.

Regards,

Jon
Pavlina
Telerik team
 answered on 15 Dec 2011
1 answer
150 views
Hi,

I need use upload file to another server with custom hander .

When I try to set property HttpHandlerUrl  to "http://10.10.10.10/uploadhandler.ashx".

It will throw an exception that System.ArgumentException: HttpHandlerUrl must be application-relative (i.e. it should start with "~/" .

Are there any solutions for me?

Thanks in advance.
Eric
Bozhidar
Telerik team
 answered on 15 Dec 2011
1 answer
149 views
I got this error message when I upgraded a project to 2011.3.1115, and later when I try to configure the project (under the Telerik menu):

Error executing custom action
Tlerik.Web.UI.VSX.Actions.SetProjectPropertiesAction: Cannot set the value in the Globals Object: the file to store the value in cannot be written to.

I am not told what the file that cannot be written to is. This is leaving my project with only Default as the skins selection.

Thanks, Steve 
Dobromir
Telerik team
 answered on 15 Dec 2011
2 answers
308 views
Hi Telerik,

Is there a way to enable(force) postback on ActiveRowChanged.

My scenario is:

I have a RadGrid with KeyboardNavigation allowed, RowSelection enabled.
<
ClientSettings EnablePostbackOnRowClick="true" AllowKeyboardNavigation="true" >

<Selecting AllowRowSelect="True" />

When i click on a row using the mouse, the post back happens and i perform the necessary operations that i wish to do.

Now, when i use the keyboard up/down keys to change the row selection, the grid does change the SelectedRow (the display shows the selection happening). But the control does not post back in this case.

My aim is to enable postback while navigation using arrow keys (so that i can perform the data binding and other logic from code-behind).

Also, if i write the java script for OnRowSelected client event (_doPostBack passing the gridId), the post back happens only once. I need to click a row with mouse again before i could navigate using the arrow keys.

Kindly suggest.

Thanks
Tarun Singla

Andrey
Telerik team
 answered on 15 Dec 2011
1 answer
138 views
I posted this as a reply at the end of a similar post but since I haven't gotten any response, I'm starting a new thread.  Here's my original post:

(Sys.WebForms.PageRequestManagerServerErrorException: Multiple controls with the same ID 'EditButton' were found. FindControl requires that controls have unique IDs.).  My grid is defined in my aspx file but my columns are defined in the form Init.  I add the columns to the grid after all columns are created and all properties are set.  

Is there a working sample with this same scenario?

Here's my code:
aspx code:
..
<telerik:RadGrid ID="gridMeasures" runat="server" >
<MasterTableView 
DataKeyNames="m_iWAPMeasureID" >
</MasterTableView> 
</telerik:RadGrid>



vb code:
Protected Sub form1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Init

gridMeasures.AllowPaging = True
gridMeasures.AutoGenerateColumns = True
gridMeasures.ShowStatusBar = True
gridMeasures.GridLines = GridLines.None
gridMeasures.Skin = "Hay"
gridMeasures.ClientSettings.Scrolling.AllowScroll = True
gridMeasures.ClientSettings.Scrolling.UseStaticHeaders = True
gridMeasures.PageSize = 50
gridMeasures.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top
gridMeasures.MasterTableView.EditFormSettings.EditColumn.Display = True
gridMeasures.MasterTableView.EditMode = GridEditMode.InPlace

AddHandler gridMeasures.DeleteCommand, AddressOf gridMeasures_DeleteCommand
AddHandler gridMeasures.NeedDataSource, AddressOf gridMeasures_NeedDataSource
AddHandler gridMeasures.InsertCommand, AddressOf gridMeasures_InsertCommand
AddHandler gridMeasures.PreRender, AddressOf gridMeasures_PreRender
AddHandler gridMeasures.UpdateCommand, AddressOf gridMeasures_UpdateCommand


Dim oWAPMeasureIDColumn As New GridBoundColumn
oWAPMeasureIDColumn.UniqueName = "m_iWAPMeasureID"
oWAPMeasureIDColumn.DataField = "m_iWAPMeasureID"
oWAPMeasureIDColumn.Visible = False


Dim oEditColumn As New GridEditCommandColumn
oEditColumn.UniqueName = "EditColumn"


Dim oDeletedColumn As New GridButtonColumn
oDeletedColumn.ConfirmText = "Delete this Measure?"
oDeletedColumn.ConfirmDialogType = GridConfirmDialogType.RadWindow
oDeletedColumn.ConfirmTitle = "Delete"
oDeletedColumn.ButtonType = GridButtonColumnType.ImageButton
oDeletedColumn.CommandName = "Delete"
oDeletedColumn.Text = "Delete"
oDeletedColumn.UniqueName = "DeleteColumn"
oDeletedColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center
oDeletedColumn.ItemStyle.CssClass = "MyImageButton"


Dim oSelectedColumn As New GridTemplateColumn
oSelectedColumn.HeaderText = String.Empty
oSelectedColumn.ItemTemplate = New clsItemSelectedTemplate("m_bSelected")
oSelectedColumn.EditItemTemplate = New clsEditSelectedTemplate("m_bSelected")
oSelectedColumn.DataField = "m_bSelected"
oSelectedColumn.UniqueName = "m_bSelected"


Dim oCategoryColumn As New GridTemplateColumn()
oCategoryColumn.ItemTemplate = New clsMeasureCategoryItemTemplate("m_sMeasureCategory")
oCategoryColumn.EditItemTemplate = New clsMeasureCategoryEditTemplate("m_sMeasureCategory", sAgId)
oCategoryColumn.DataField = "m_sMeasureCategory"
oCategoryColumn.UniqueName = "m_sMeasureCategory"
oCategoryColumn.HeaderText = "Measure Category"


Dim oDescriptionColumn As New GridTemplateColumn()
oDescriptionColumn.ItemTemplate = New clsMeasureDescriptionItemTemplate("m_sMeasureDescription")
oDescriptionColumn.EditItemTemplate = New clsMeasureDescriptionEditTemplate("m_sMeasureDescription", sAgId)
oDescriptionColumn.DataField = "m_sMeasureDescription"
oDescriptionColumn.UniqueName = "m_sMeasureDescription"
oDescriptionColumn.HeaderText = "Measure Description"


Dim oPricePerUnitColumn As New GridTemplateColumn()
oPricePerUnitColumn.ItemTemplate = New clsPricePerUnitItemTemplate("m_decPricePerUnit")
oPricePerUnitColumn.EditItemTemplate = New clsPricePerUnitEditTemplate("m_decPricePerUnit")
oPricePerUnitColumn.DataField = "m_decPricePerUnit"
oPricePerUnitColumn.UniqueName = "m_decPricePerUnit"
oPricePerUnitColumn.HeaderText = "Unit Price"
oPricePerUnitColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right


Dim oUnitColumn As New GridTemplateColumn()
oUnitColumn.ItemTemplate = New clm_sUnitItemTemplate("m_sUnit")
oUnitColumn.EditItemTemplate = New clm_sUnitEditTemplate("m_sUnit")
oUnitColumn.DataField = "m_sUnit"
oUnitColumn.UniqueName = "m_sUnit"
oUnitColumn.HeaderText = "Unit"


Dim oAuthQtyColumn As New GridTemplateColumn()
oAuthQtyColumn.ItemTemplate = New clsAuthQtyItemTemplate("m_decAuthorizedQty")
oAuthQtyColumn.EditItemTemplate = New clsAuthQtyEditTemplate("m_decAuthorizedQty")
oAuthQtyColumn.HeaderText = "Authorized Qty"
oAuthQtyColumn.UniqueName = "m_decAuthorizedQty"
oAuthQtyColumn.DataField = "m_decAuthorizedQty"
oAuthQtyColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right
oAuthQtyColumn.ItemStyle.Width = 65


Dim oActualQtyColumn As New GridTemplateColumn()
oActualQtyColumn.ItemTemplate = New clsActQtyItemTemplate("m_decQuantity")
oActualQtyColumn.EditItemTemplate = New clsActQtyEditTemplate("m_decQuantity")
oActualQtyColumn.HeaderText = "Actual Qty"
oActualQtyColumn.UniqueName = "m_decQuantity"
oActualQtyColumn.DataField = "m_decQuantity"
oActualQtyColumn.ItemStyle.Wrap = True
oActualQtyColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right
oActualQtyColumn.ItemStyle.Width = 65


Dim oTotalPriceColumn As New GridTemplateColumn()
oTotalPriceColumn.ItemTemplate = New clsTotalPriceItemTemplate("m_decTotalPrice")
oTotalPriceColumn.EditItemTemplate = New clsTotalPriceEditTemplate("m_decTotalPrice")
oTotalPriceColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right
oTotalPriceColumn.DataField = "m_decTotalPrice"
oTotalPriceColumn.UniqueName = "m_decTotalPrice"
oTotalPriceColumn.HeaderText = "Total Price"


Dim oStatusColumn As New GridTemplateColumn()
oStatusColumn.ItemTemplate = New clm_sStatusItemTemplate("m_sStatus")
oStatusColumn.EditItemTemplate = New clm_sStatusEditTemplate("m_sStatus")
oStatusColumn.DataField = "m_sStatus"
oStatusColumn.UniqueName = "m_sStatus"
oStatusColumn.HeaderText = "Status"


Dim oContractorColumn As New GridTemplateColumn()
oContractorColumn.ItemTemplate = New clsContractorItemTemplate("m_sContractor")
oContractorColumn.EditItemTemplate = New clsContractorEditTemplate("m_sContractor", sAgId)
oContractorColumn.DataField = "m_sContractor"
oContractorColumn.UniqueName = "m_sContractor"
oContractorColumn.HeaderText = "Contractor"


Dim oFundSourceColumn As New GridTemplateColumn()
oFundSourceColumn.ItemTemplate = New clsPrimaryFundSourceItemTemplate("m_sPrimaryFundSource")
oFundSourceColumn.EditItemTemplate = New clsPrimaryFundSourceEditTemplate("m_sPrimaryFundSource", sAgId)
oFundSourceColumn.DataField = "m_sPrimaryFundSource"
oFundSourceColumn.UniqueName = "m_sPrimaryFundSource"
oFundSourceColumn.HeaderText = "Funding Source"


Dim oStateCategoryColumn As New GridTemplateColumn()
oStateCategoryColumn.ItemTemplate = New clm_sStateCategoryItemTemplate("m_sStateCategory")
oStateCategoryColumn.EditItemTemplate = New clm_sStateCategoryEditTemplate("m_sStateCategory", sAgId)
oStateCategoryColumn.DataField = "m_sStateCategory"
oStateCategoryColumn.UniqueName = "m_sStateCategory"
oStateCategoryColumn.HeaderText = "BWR Category"


Dim oMeasureInfoID As New GridBoundColumn
oMeasureInfoID.UniqueName = "m_iMeasureInfoID"
oMeasureInfoID.DataField = "m_iMeasureInfoID"
oMeasureInfoID.Visible = False


'Add the columns to the grid
gridMeasures.MasterTableView.Columns.Add(oWAPMeasureIDColumn)
gridMeasures.MasterTableView.Columns.Add(oEditColumn)
gridMeasures.MasterTableView.Columns.Add(oDeletedColumn)
gridMeasures.MasterTableView.Columns.Add(oSelectedColumn)
gridMeasures.MasterTableView.Columns.Add(oCategoryColumn)
gridMeasures.MasterTableView.Columns.Add(oDescriptionColumn)
gridMeasures.MasterTableView.Columns.Add(oPricePerUnitColumn)
gridMeasures.MasterTableView.Columns.Add(oUnitColumn)
gridMeasures.MasterTableView.Columns.Add(oAuthQtyColumn)
gridMeasures.MasterTableView.Columns.Add(oActualQtyColumn)
gridMeasures.MasterTableView.Columns.Add(oTotalPriceColumn)
gridMeasures.MasterTableView.Columns.Add(oStatusColumn)
gridMeasures.MasterTableView.Columns.Add(oContractorColumn)
gridMeasures.MasterTableView.Columns.Add(oFundSourceColumn)
gridMeasures.MasterTableView.Columns.Add(oStateCategoryColumn)
gridMeasures.MasterTableView.Columns.Add(oMeasureInfoID)


End Sub
Pete
Top achievements
Rank 1
 answered on 15 Dec 2011
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?