Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
74 views
Hi,

I am facing a problem in paging. In my application , i have some dropdown controls and 1 command button. When i click on command button, it will search the records according to dropdown value  and display the result in radgrid. My problem is that suppose when i am on 3rd page index and then i click on search button, it dont go to first page index but it keeps the page index as 3 eventhough there are no records on 3rd page . i am setting the current page index of radgrid  as 0, but its not working at all. I am really stuck with this. Can you please help me ASAP.

Thanks,
Neha
Tsvetoslav
Telerik team
 answered on 15 Mar 2010
1 answer
128 views
I am using LoadOnDemand from a web service to populate a treeview. I am trying to provide functionality so the user can right-click a node and get a context menu to choose Add, Copy, Cut and Delete functionality to edit the tree. In a previous thread:

http://www.telerik.com/community/forums/aspnet-ajax/treeview/how-to-refresh-tree-when-node-is-added-using-webservice-method.aspx

Veronica was kind enough to point me to the technique of collapsing a node, clearing its children, setting its expand mode like this "Telerik.Web.UI.TreeNodeExpandMode.WebService", and then committing the change.

That is great. But, what event can I key on to run this code? All the events provided in the client side API happen BEFORE the edits are made (before the trip to the database) so, how can I wait until AFTER the node is pasted, deleted, or added (after the changes to the database) and THEN update the treeview to reflect the change.

I have been searching the documentation but, I haven't found any way of capturing the return from the server.

Thanks for whatever advice you can offer.

UPDATE: After further research...should I do my operation in reverse? Should I do all the edits on the client side (in the OnClientContextMenuItemClicked event, etc) and then have the server use the ClientOperations property to handle the edits that have just been made, and update the database? For some reason I feel more comfortable editing the database and then making sure the treeview in the browser updates to reflect the changes, in stead of visa versa but, I guess it is all the same in the end. [what if the database update fails for some reason? Then the client will be out of synch with the data.]
Roger
Top achievements
Rank 1
 answered on 15 Mar 2010
5 answers
585 views
I get the error "Cannot find column [their_qty]" when I added a GridCalculatedColumn to my grid.

Here is the stack trace shown:
 
[EvaluateException: Cannot find column [their_qty].]  
   System.Data.NameNode.Bind(DataTable table, List`1 list) +1188205  
   System.Data.DataExpression.Bind(DataTable table) +59  
   System.Data.DataColumn.SetTable(DataTable table) +4828348  
   System.Data.DataColumnCollection.BaseAdd(DataColumn column) +272  
   System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column) +78  
   System.Data.DataColumnCollection.Add(DataColumn column) +8  
   Telerik.Web.UI.GridDataTableFromEnumerable.GetColumnsToUse() +2004  
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1028  
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +55  
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +40  
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31  
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +222  
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +155  
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +556  
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +219  
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +73  
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57  
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114  
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31  
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142  
   Telerik.Web.UI.GridTableView.PerformSelect() +28  
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73  
   Telerik.Web.UI.GridTableView.DataBind() +354  
   Telerik.Web.UI.RadGrid.DataBind() +165  
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3855  
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +175  
   System.Web.UI.Control.LoadRecursive() +50  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Control.LoadRecursive() +141  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627  
   

If I can use a GridNumericColumn for the same data field without a problem, but the presence of this particular column in a calculation is objectionable.

Here is an extract of the RadGrid declaration:
      <telerik:RadGrid ID="rgrdReport" runat="server" GridLines="Vertical" Skin="Office2007" 
        AutoGenerateColumns="False" PageSize="25" EnableLinqExpressions="false">  
        <MasterTableView CommandItemSettings-ShowExportToWordButton="True" CommandItemSettings-ShowExportToPdfButton="True" 
          CommandItemSettings-ShowExportToExcelButton="True">  
          <CommandItemSettings ShowExportToExcelButton="True"   
            ShowExportToPdfButton="True" ShowExportToWordButton="True" /> 
          <Columns> 
            <telerik:GridNumericColumn UniqueName="column" HeaderText="Our Quantity" DataField="our_qty" DataFormatString="{0:N}" DataType="System.Decimal">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridNumericColumn> 
            <telerik:GridNumericColumn UniqueName="column1" HeaderText="Our $" DataField="our_amount" DataFormatString="{0:C}" DataType="System.Decimal">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridNumericColumn> 
            <telerik:GridNumericColumn UniqueName="column2" HeaderText="Their Quantity" DataField="their_qty" DataFormatString="{0:N}" DataType="System.Decimal">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridNumericColumn> 
            <telerik:GridNumericColumn UniqueName="column3" HeaderText="Their $" DataField="their_amount" DataFormatString="{0:C}" DataType="System.Decimal">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridNumericColumn> 
            <telerik:GridCalculatedColumn UniqueName="column4" HeaderText="Quantity Variance" DataFields="our_qty, their_qty" Expression="{1}-{0}">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridCalculatedColumn> 
            <telerik:GridCalculatedColumn UniqueName="column5" HeaderText="$ Variance" DataFields="our_amount, their_amount" Expression="{1}-{0}">  
                  <ItemStyle Width="80px" HorizontalAlign="Right" /> 
            </telerik:GridCalculatedColumn> 
          </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="False">  
          <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
        </ClientSettings> 
      </telerik:RadGrid> 
 

Remove "column4" and the grid displays fine.  How can [their_qty] be ok in column2 but not column4?
This is the second error I received with this grid, but a search of the forum and adding EnableLinqExpressions="false" to the defenition fixed the earlier error "DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'column4Result'."

Thanks.
Tsvetoslav
Telerik team
 answered on 15 Mar 2010
2 answers
146 views
Hi

I have a user control Page which has insert form, all the controls are working fine except the radcontrols.
am i doing something wrong? or do i have to do extra work for it.

here is the code for RadControl on the userControl Page(ascx):
<telerik:RadComboBox ID="RadComboBox1" Runat="server"
                DataSourceID="SqlDataSource1"
                Text='<%# DataBinder.Eval( Container, "DataItem.CategoryName" ) %>' DataTextField="CategoryName"
                DataValueField="CategoryID" Width="160px" Skin="Sunset">
            </telerik:RadComboBox>

The Rad Control above populate the data correctly but does not bind it when update or insert.

Another Control which works fine:
<asp:TextBox id="TextBox3" runat="server"
Text='<%# DataBinder.Eval( Container, "DataItem.FullCode" ) %>' Width="200px"></asp:textbox>


i followed this example which is good, but i think Telerik should include ComboBox on it to show us how to do it;
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
grand lorie
Top achievements
Rank 1
 answered on 15 Mar 2010
1 answer
79 views
Are polygon shapes not recognized by the image map editor?

BR,
Marc
Rumen
Telerik team
 answered on 15 Mar 2010
2 answers
99 views
We have a page that has a RadGrid and an AjaxManager linked to it so that it looks seamless when they attempt to edit, add and delete rows in it. The grid loads with one row in it that has 2 time picker columns and 1 date picker column. When the user clicks edit to edit the row, the loading panel spins briefly, then freezes and IE starts using 100% of the thread. We've duplicated this in both IE 6 and 7, but haven't really tried any others yet.

Does anyone have any ideas as to what might be causing this?

Thanks,
Adam
Adam
Top achievements
Rank 1
 answered on 15 Mar 2010
1 answer
101 views
Hi,
       I am using RadUpload control to upload image.
       Is it possible to display the selected image in a RadBinaryImage control on OnClientFileSelected client-side event.
Shinu
Top achievements
Rank 2
 answered on 15 Mar 2010
1 answer
121 views
I have a table like the following:

ID     Label        Group   SubGroup
1        Blue        Color    Preferred
2        Red        Color    Not Preferred
3        Sweet     Taste    Good
4        Sour        Taste   Bad



I was hoping for a simple radtree checkbox solution that would display like so:

+Color
    +Preferred
        Blue - with a checkbox
   +Not Preferred
        Red - with a checkbox
+Taste
    +Good
        Sweet - with a checkbox
+Taste
    +Sour
        Bad - with a checkbox

any suggestions would be great
Vesko
Top achievements
Rank 2
 answered on 15 Mar 2010
1 answer
103 views
Hi,

If we set the height of the fileexplorer to say 800px, but if the user has their browser sized so the viewport is less than 800px AND the page is no bigger than 800px the top of the explorer is cut off.

This seems to be due to the auto centring setting the css top position to negative!

How do we fix this?

I thought about hooking into some client side event to reposition the top of the window to no less than 0, but cannot see in the documentation how we'd achieve this!


Thanks
Svetlina Anati
Telerik team
 answered on 15 Mar 2010
6 answers
463 views
Hi,
       I am using RadGrid, which has the feature of Virtual scrolling also. I planned to change the height of the Grid based on the height of the screen.Which is calling everytime window on loading.

Suppose if i could adjust the height of the grid, how can i adjust the height of the virtual scroll bar.So i also want to adjust the height of the scroll with grid in clinet side. How can i fix the scrolling height in clientside.

-Thanks
John John
Top achievements
Rank 1
 answered on 15 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?