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

I have a Radgrid placed inside a PageView for a TabStrip,
The Grid slightly overflows the border of the TabStrip but if i sort by dragging a column header to group the grid completely overflows the border of the TabStrip?

Any ideas on how a can resolve this please.

Many Thanks

Regards

Darren
Jon
Top achievements
Rank 1
 answered on 17 Jun 2011
1 answer
56 views
Hi

I just cann't seem to wire up my grid to issue a server side event on a row selection.

I see there is a client side event.

Do I have to use that and then issue a post-back myself?

TIA
Casey
Top achievements
Rank 1
 answered on 17 Jun 2011
1 answer
94 views
Hi,

my workmate already installed control for our project with vs2010, but he will leave soon, so I delete his installation , then I download new copy of product and installed it. but the follow bug occurred which didn't happen before. could  you give me a help?


 

Server Error in '/zPortalInHouse' Application.

The value '31/12/9999' of the MaximumValue property of 'EDDRangeValidator' cannot be converted to type 'Date'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The value '31/12/9999' of the MaximumValue property of 'EDDRangeValidator' cannot be converted to type 'Date'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The value '31/12/9999' of the MaximumValue property of 'EDDRangeValidator' cannot be converted to type 'Date'.]
   System.Web.UI.WebControls.RangeValidator.ValidateValues() +1346298
   System.Web.UI.WebControls.RangeValidator.ControlPropertiesValid() +12
   System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +36
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

Andrey
Telerik team
 answered on 17 Jun 2011
1 answer
103 views
I have been trying to launch the Tekerik.Sales.Dashboard demo.

I have updated the Telerik.OpenAccess references to point to the installed dlls instead of the ones that came with the demo project.

I am getting the following errors now:

Error 1 Using the generic type 'Telerik.OpenAccess.Query<T>' requires 1 type arguments C:\Users\myusername\Downloads\SalesDashboardSource\SalesDashboard\Telerik.SalesDashboard.Web\App_Code\SalesDashboardService.cs 11 26 C:\...\Telerik.SalesDashboard.Web\

Error 1 The type or namespace name 'Web' does not exist in the namespace 'Telerik' (are you missing an assembly reference?) C:\Users\myusername\Downloads\SalesDashboardSource\SalesDashboard\Telerik.SalesDashboard.Web\App_Code\ToolTipWebService.cs 14 15 C:\...\Telerik.SalesDashboard.Web\

Is there any link that shows how to get rid of all these errors and launch this demo app??????????????????????????

Thanks



Alexander
Telerik team
 answered on 17 Jun 2011
1 answer
85 views
Hej,
Is there any possiblity to filter only existed items. I mean situation when i type an incorrect text, radcombobox take the first (or other) item.

Best regards,
Dimitar Terziev
Telerik team
 answered on 17 Jun 2011
3 answers
96 views
There appears to be a HeaderTooltip and FilterImageTooltip, but nothing for an the DragImageUrl.  Is there some workaround or plans on adding this?
Marin
Telerik team
 answered on 17 Jun 2011
5 answers
912 views
Hi,
I am trying to get the total items count on my grid (total count of all the items in all the pages of the grid) in my code behind when Paging is enabled.
 
My data source for the grid returns 17 rows and the data is displayed in 2 pages. 
When i do an Items count it only returns me 10 (since my page size is 10)
i tried this code which was suggested in this forum -

 

<telerik:RadGrid ID="GridInvoiceDetailsPO" runat="server" AllowPaging="True"
AutoGenerateColumns="False" PageSize="10" Visible="True" Skin="Outlook"
PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-AlwaysVisible="true"

.... />


int
i = GridInvoiceDetailsPO.Items.Count;
GridInvoiceDetailsPO.AllowPaging = false;
GridInvoiceDetailsPO.Rebind();
int j = GridInvoiceDetailsPO.Items.Count;
GridInvoiceDetailsPO.AllowPaging = true;
GridInvoiceDetailsPO.Rebind();
int k = GridInvoiceDetailsPO.Items.Count;

 

 

 

But i, j and k all return 10. is there something i am doing wrong?
Also i dont just want to get the total count, i want to iterate through the collection and get/set some data.

Ullas

 

 

Pavlina
Telerik team
 answered on 17 Jun 2011
3 answers
300 views
Hi Everyone,

First of all I have to say sorry about my English. It's not my parent language.

Let's focus on the problem I have now.  I have a rad grid with the editform. I am sure that I did follow the example.

Here are the codes I have done.

Design code in my user control.
<telerik:RadGrid ID="RadGrid1" AllowAutomaticUpdates="True" runat="server"
    Width="100%" GridLines="None"
            AutoGenerateColumns="False" PageSize="13" AllowSorting="True" AllowPaging="True"
            OnUpdateCommand="RadGrid1_UpdateCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
            ShowStatusBar="True" OnInsertCommand="RadGrid1_InsertCommand"
    OnDeleteCommand="RadGrid1_DeleteCommand" AllowFilteringByColumn="True"
    CellSpacing="0" onitemdatabound="RadGrid1_ItemDataBound">
            <MasterTableView DataKeyNames="ID" AllowMultiColumnSorting="True" Width="100%"
                CommandItemDisplay="Top" InsertItemDisplay="Top"
                CommandItemSettings-AddNewRecordText="Add new record"
                HierarchyLoadMode="ServerBind">
<CommandItemSettings AddNewRecordText="Add new record" ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton"  EditImageUrl="~/RadControls/Grid/Skins/Edit.gif"  UniqueName="EditCommandColumn">
                        <HeaderStyle Width="16px"></HeaderStyle>
                        <ItemStyle Width="16px" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this record?" UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton" ImageUrl="~/RadControls/Grid/Skins/Delete.gif" Text="Delete">
                    <HeaderStyle Width="16px"></HeaderStyle>
                        <ItemStyle Width="16px" /></telerik:GridButtonColumn>
                    <telerik:GridBoundColumn UniqueName="Name" SortExpression="Name" HeaderText="Document Name"
                        DataField="Name" />
                    <telerik:GridBoundColumn UniqueName="Description" HeaderText="Description" Visible="false"
                        DataField="Description" />
                    <telerik:GridDropDownColumn UniqueName="DocumentType" ListDataMember="DocumentType"
                        SortExpression="DocumentType" ListTextField="DocumentType" ListValueField="DocumentType"
                        HeaderText="Document type" DataField="DocumentType">
                    </telerik:GridDropDownColumn>
 <telerik:GridBoundColumn datafield="UpdateTime" AllowFiltering="false"
                                        DataFormatString="{0:dd MMM yyyy HH:mm:ss}" editformheadertextformat="{0}"
                                        headertext="Last Updated"
                                        readonly="True" uniquename="UpdateTime">
                                        <ItemStyle HorizontalAlign="Left" Width="160px" Wrap="False" />
                                        <HeaderStyle HorizontalAlign="Left" Width="160px" Wrap="False" />
                                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings  CaptionFormatString="Edit record : {0}" CaptionDataField="Name">
                    <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle>
                    <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>
                    <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>
                    <EditColumn ButtonType="ImageButton"  />
                     
                </EditFormSettings>
            </MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>



And below is my code behind.
protected void Page_Load(object sender, EventArgs e)
       {
 
       }
       public void Initialize(int iProjectID)
       {
           RadGrid1.MasterTableView.EditMode = GridEditMode.EditForms;
           this.hdProjectID.Value = iProjectID.ToString();
           this.RadGrid1.DataBind();
            
       }
 
       protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
       {
           GridEditableItem editedItem = e.Item as GridEditableItem;
           GridEditManager editMan = editedItem.EditManager;
 
           foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
           {
               if (column is IGridEditableColumn)
               {
                   IGridEditableColumn editableCol = (column as IGridEditableColumn);
                   if (editableCol.IsEditable)
                   {
                       IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);
 
                       string editorType = editor.ToString();
                       string editorText = "unknown";
                       object editorValue = null;
 
                       if (editor is GridTextColumnEditor)
                       {
                           editorText = (editor as GridTextColumnEditor).Text;
                           editorValue = (editor as GridTextColumnEditor).Text;
                       }
 
                       if (editor is GridDropDownColumnEditor)
                       {
                           editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +
                               (editor as GridDropDownColumnEditor).SelectedValue;
                           editorValue = (editor as GridDropDownColumnEditor).SelectedValue;
                       }
 
                       try
                       {
                           int iDataID = (int)editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["EmployeeID"];
                           Data oData = new Data(iDataID, this.UserID);
                           bool bUpdated = false;
                           switch(column.UniqueName)
                           {
                               case "Name":
                                   oData.Name = editorValue.ToString();
                                   bUpdated = true;
                                   break; 
                               case "Description":
                                   oData.Description = editorValue.ToString();
                                   bUpdated = true;
                                   break;
                               case "DataType":
                                   oData.TypeID = Convert.ToInt32(editorValue.ToString());
                                   break;
                           }
                           if (bUpdated)
                           {
                             //
                           }
                       }
                       catch (Exception ex)
                       {
                           RadGrid1.Controls.Add(new LiteralControl("<strong>Unable to update'" + column.HeaderText + "' value.</strong> - " + ex.Message));
                           e.Canceled = true;
                           break;
                       }
                   }
               }
           }
       }
 
 
       protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
       {
           Datas oDatas = new Datas(Convert.ToInt32(this.hdProjectID.Value), this.UserID, true);
           this.RadGrid1.DataSource = oDatas;
       }
       protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
       {
           switch (e.CommandName)
           {
               case "":
                   if (RadGrid1.EditIndexes.Count == 0)
                   {
                       return;
                   }
 
                   foreach (GridDataItem item in RadGrid1.EditItems)
                   {
                       GridEditableItem itemToEdit =
                       (item.OwnerTableView.EditMode == GridEditMode.InPlace) ?
                       (GridEditableItem)item : (GridEditableItem)item.EditFormItem;
                       //UpdateItem(itemToEdit);
                   }
 
                   e.Item.OwnerTableView.Rebind();
                   break;
           }
       }
       protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
       {
           GridEditableItem editedItem = e.Item as GridEditableItem;
           GridEditManager editMan = editedItem.EditManager;
           Datas oDatas = new Datas(Convert.ToInt32(this.hdProjectID.Value), this.UserID, true);
           Data oDoc = oDatas.Add(1);
           foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
           {
               if (column is IGridEditableColumn)
               {
                   IGridEditableColumn editableCol = (column as IGridEditableColumn);
                   if (editableCol.IsEditable)
                   {
                       IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);
 
                       string editorText = "unknown";
                       object editorValue = null;
 
                       if (editor is GridTextColumnEditor)
                       {
                           editorText = (editor as GridTextColumnEditor).Text;
                           editorValue = (editor as GridTextColumnEditor).Text;
                       }
                       if (editor is GridDropDownColumnEditor)
                       {
                           editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +
                            (editor as GridDropDownColumnEditor).SelectedValue;
                           editorValue = (editor as GridDropDownColumnEditor).SelectedValue;
                       }
 
                       try
                       {
                           switch (column.UniqueName)
                           {
                               case "Name":
                                   oDoc.Name = editorValue.ToString();
                                   break;
                               case "Description":
                                   break;
                               case "DataType":
                                   break;
 
                           }
                         
                       }
                       catch (Exception ex)
                       {
                           RadGrid1.Controls.Add(new LiteralControl("Unable to add new Data. Reason: " + ex.Message));
                           e.Canceled = true;
                       }
 
                   }
               }
           }
       }
       protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
           if (e.Item is GridEditableItem && e.Item.IsInEditMode)
           {
               GridEditableItem editedItem = e.Item as GridEditableItem;
               GridEditManager editMan = editedItem.EditManager;
               GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("DataType"));
               DropDownList ddList = editor.DropDownListControl;
               DataTypeList oDTList = new DataTypeList();
               ddList.DataSource = oDTList;
               ddList.DataBind();
           }
       }
       protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
       {
           int ID = Convert.ToInt32((e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
           Datas oDatas = new Datas(Convert.ToInt32(this.hdProjectID.Value), this.UserID, true);
           oDatas.Remove(ID);
       }


Just in case you guys want to know what kind of datatype that I'm binding it to the grid. It's the arraylist.


Could you please tell where in the code that I miss ? Right now when I click on the "Insert new record " It show me the edit form . But once I click on the update button . There is nothing happen.


Thank you so much.


Dang
Tsvetoslav
Telerik team
 answered on 17 Jun 2011
7 answers
511 views
I have a RadGrid which is created at runtime and added to a place holder control.

I set the commandItemSettings.ShowExportToExcelButton = true and the built-in export button appears.

After the grid is created I call the Rebind() method so that my NeedDataSource event is raised (Advanced Data Binding):

I'm using NeedDataSource event:
 void radGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            this.radGrid.DataSource = this.dataSource;
        }

When I click the Export to Excel button nothing happens.

How should I implement this or use it so that the export works?

Many thanks,
Pooya
Top achievements
Rank 1
 answered on 17 Jun 2011
3 answers
140 views
Hi!

We have implemented a custom solution with the RadScheduler with WebService(and a DbSchedulerProvider) binding using the online demos.

I have one question: after the Appointment save process the GetAppointments method is re-called and it calls the LoadResources(Apppointment apt) method.

What should this method return? All the Scheduler Resources or just the Appointment resources?

It all seems fine until we try to edit/update the Appoinment as the Resources doesnt show up with the selected resources(in DropDownLists). We are only returning the Appointment resource collection.

Best regards

Software Development
Top achievements
Rank 1
 answered on 17 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?