Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
I have a RadGrid that I'm supplying a data source in code-behind, and trying to use InPlace editing.  I'm able to put the row in to the Edit view, enter new values, and click update, but the users new information is never saved:

<telerik:RadGrid ID="radGrdDetails" runat="server"  EnableLinqExpressions="false"
                    AllowPaging="False" AllowSorting="True" GridLines="None" Skin="<%$ AppSettings: YALSkin%>"
                     AllowAutomaticInserts="False" AllowAutomaticUpdates="false" AllowMultiRowEdit="false" showstatusbar="true"  Width="800" AllowFilteringByColumn="true" AutoGenerateColumns="false" AutoGenerateEditColumn="false">
                                                              
                            <MasterTableView CommandItemDisplay="Top"   DataKeyNames="ID" EditMode="InPlace">
                                                               <Columns>
                                    <telerik:GridEditCommandColumn />                                                              
                                    <telerik:GridBoundColumn UniqueName="ID" ReadOnly="true" Visible="false"   DataField="ID"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="NUMBER" ReadOnly="true" DataField="NUMBER" HeaderText="Number" SortExpression="NUMBER"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="TYPE" ReadOnly="true" DataField="TYPE" HeaderText="Type" SortExpression="TYPE"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="COUNTY" DataField="COUNTY" HeaderText="County" SortExpression="COUNTY"></telerik:GridBoundColumn>
                                                                   </Columns>                                  
 
 
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn>
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                             
                            </MasterTableView>
                         
                </telerik:RadGrid>

the binding is done in Page.Load

I'm trying to build a Hashtabe containing what the user has changed.  Here is the grid's update command:

Protected Sub radGrdDetails_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles radGrdDetails.UpdateCommand
       Dim oldValues, newValues, changedValues As Hashtable
       newValues = New Hashtable
       changedValues = New Hashtable
 
       Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
       oldValues = editedItem.SavedOldValues
 
       editedItem.ExtractValues(newValues)
 
       For Each key As String In oldValues.Keys
           If oldValues(key) = newValues(key) Then
               'field has not changed, don't edit
           Else
               'field has changed
               changedValues.Add(key, newValues(key))
           End If
       Next
 
   End Sub


However, oldValues and newValues are always exactly the same -- ie, what the user puts in isn't being saved.
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Jul 2012
0 answers
79 views
HI,

I have a bug in all my grid on my web site on IIS 7.

I think it's a simple web.config problem but I can't find what it is.

Do you have any idea?

Thanks!!
Vincent
Top achievements
Rank 1
 asked on 05 Jul 2012
2 answers
142 views
So here is what I am trying to achieve.  I have multiple radgrids on a single page in a tabbed view.  Some of these radgrids implement the same user control.  However they pull different data.  I have public properties set in the usercontrol that reference the input fields (RadTextBox, RadComboBox, Checkbox, etc.).  When I implement the user control driectly on the page without binding it to a radgrid everything works properly.  I can do:
RadTextBox item1 = userControl1.Item1TextBox;
InsertItem(item1.Text);
where InsertItem is a method that inserts the item text into the database

However on the page with the radgrids the way the user control is bound is
protected override void OnInit(EventArgs e)
{
   base.OnInit(e)
        RadGrid1.Skin = Skin;
        RadGrid1.Width = GridWidth;
        RadGrid1.AutoGenerateColumns = false;
        RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
        RadGrid1.NeedDataSource += RadGrid1_InsertCommand;
        RadGrid1.NeedDataSource += RadGrid1_UpdateCommand;
        RadGrid1.NeedDataSource += RadGrid1_DeleteCommand;
        RadGrid1.MasterTableView.Width = Unit.Percentage(100);
        RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
        RadGrid1.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true;
        RadGrid1.MasterTableView.CommandItemSettings.ShowRefreshButton = false;
        RadGrid1.MasterTableView.ShowHeadersWhenNoRecords = true;
        RadGrid1.MasterTableView.EditFormSettings.UserControlName = "/includes/userControls/RoofForm.ascx";
        RadGrid1.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl;
        RadGrid1.MasterTableView.DataKeyNames = DataKeys;
}
with the main point being:

RadGrid1.MasterTableView.EditFormSettings.UserControlName = "/includes/userControls/RoofForm.ascx";
RadGrid1.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl;

So my question is:  Is it possible to access these public properties which return a control in the InsertCommand/UpdateCommand bindings or am I forced to use the FindControl?

For example:
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
    UserControl userControlForm= e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as UserControl;
 
    RadComboBox item1 = userControlForm.Property1;
    RadComboBox item2 = userControlForm.Property2;
    RadComboBox item3 = userControlForm.Property3;
    RadComboBox item4 = userControlForm.Property4;
    RadComboBox item5 = userControlForm.Property5;
    RadDatePicker item6 = userControlForm.Property6;
    RadNumericTextBox item7 = userControlForm.Property7;
    RadNumericTextBox item8 = userControlForm.Property8;
 
        if (insert(item1.text, item2.text, item3.text, item4.text, etc..)
        {
            ErrorMessages.Text += "<br />The  item was saved but there were other errors";
        }
        else
        {
            AllSaved = false;
            ErrorMessages.Text += "<br />The item was not saved.  Please go to the parent entry to add the item.";
        }
}


If this isn't clear let me know and I will be happy to elaborate.
Kevin
Top achievements
Rank 1
 answered on 05 Jul 2012
1 answer
93 views
Hi 

Below is wire frame of my asp.net page.

Rad Splitter
--------------------------------------------------------------------------------
| |     |
| |     | 
| |     | 
| Left pane | Right pane     | 
| |     | 
| |     | 
| |     | 
-------------------------------------------------------------------------------- 


Contents in left pane details:-
In it I am having one radtoolbar 
On clicking any buttons radtoolbar , I am using content URL properties set_contentURL of rightPane.

Scenarios:-
When first time page gets opened in rightPane it is not having "O" querystring parameter.
 But when use navigates(redirects to another page right Pane) further in page opened in rightPane  "O" querystring parameter will come with some value (let's say O=1). When user navigates to another page again then O will get changed to any other number.

What I want?
I need to store O=1 in hiddenField in aspx page.

Initially I was using iFrame inside rightPane and I was able to achieve it by using iFrame's client side onLoad evnet.

But as per telerik help rightPane  becomes iFrame automatically  by using set_contentUrl property of rightPane from leftPane links.

Problem:-

I am not able to find clientside load event for rightPane.

Please help me to proceed further ASAP.







Dobromir
Telerik team
 answered on 05 Jul 2012
3 answers
334 views
I'd like to place the Y Axis (Title/Tick) at the bottom of the chart instead of the default top position. To see an example of the default top position you can visit Telerik's demo here. What I'd like to do is display the Sum and ticks (ex. $0, $100000, etc.) at the bottom of the chart. This is the default functionality of the standard Telerik Chart when placed in Horizontal orientation. Thanks.
Hunter
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
72 views
Hello, I am using RADEditor to generate HTML which will be rendered by a third party component that does not support <span> tags. I need font size and style to use the old <FONT> tag. Is there any way to configure RADEditor to do so?
Rumen
Telerik team
 answered on 05 Jul 2012
2 answers
232 views
Hi all can anyone come up with a solution for getting the hidden/unvisible values from a radgrid which is binded dynamically ..

my requirement is to get hidden values of the particular checked rows in the checkbox when a button is clicked
under button_click event i need to retrieve the values which are hidden or kept visible=false which is binded to radgrid dynamically from .cs page..

this is my aspx page

            <telerik:RadGrid ID="M" runat="server" Width="99%" AllowPaging="True" EnableViewState="False"
                GridLines="None" meta:resourcekey="MResource1" AllowFilteringByColumn="true"
                OnInit="GridControl_Init" EnableLinqExpressions="false" 
                EnableEmbeddedSkins="false" AutoGenerateColumns="False">
                <HeaderContextMenu EnableEmbeddedSkins="True">
                </HeaderContextMenu>
                <FilterMenu Skin="Nediso" EnableEmbeddedSkins="false">
                </FilterMenu>
                <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" AlwaysVisible="true" />
                <MasterTableView Width="100%" EnableViewState="False" AllowFilteringByColumn="true">
                
                <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                <Columns>  
                     <telerik:GridTemplateColumn  AllowFiltering="false" AutoPostBackOnFilter="false" HeaderStyle-Width="5%" ItemStyle-Width="5%" >
                    <HeaderStyle Width="3%" HorizontalAlign="Justify" />
                    <ItemStyle Width="3%" HorizontalAlign="Justify" />
                    <HeaderTemplate>
                    <input type="checkbox" runat="server" value="check" ID="checkbox"    />
                    </HeaderTemplate>
                    <ItemTemplate>
                    <asp:CheckBox runat="server" AutoPostBack="false" Width="5%" ID="checkbox2" />
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>




                     <telerik:GridBoundColumn DataField="TOKEN" Visible="false" UniqueName="TOKEN" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FIRST NAME" HeaderText="FIRST NAME" UniqueName="FIRST NAME">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LAST NAME" HeaderText="LAST NAME" UniqueName="LAST NAME">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" UniqueName="STATUS">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DESIGNATION" HeaderText="DESIGNATION" UniqueName="DESIGNATION">
                    </telerik:GridBoundColumn>
                    </Columns>
                    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                    
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="True">
                    <Resizing AllowColumnResize="True" />
                    <Selecting AllowRowSelect="True" />                    
                    <ClientEvents OnFilterMenuShowing="OnFilterMenuShowing"></ClientEvents> 
                    </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Type="None" />
                    <ExpandAnimation Type="None" />
                </FilterMenu>
            </telerik:RadGrid>

Kranthi
Top achievements
Rank 1
 answered on 05 Jul 2012
0 answers
144 views
Hi all,
I have a Windows7 skinnedGrid that allows multi row select Client side so I dont have to reload the Grid data every time a row is selected server side. A radcontextmenu is set up with an option to "update Selected Rows". This fires the update command using client side mastertable.firecommand. I can confirm the updatecommand fires on the server side.

I want to then loop through all selected rows within the updatecommand event server side, get the datakeyvalue, update the corresponding records in the database, then reload the Grid with the new data. I cant seem to figure out a good way to do this. When I check the selected row count in the updatecommand event, it is zero. This tells me that server side is not aware of the client side selected rows. Any ideas? Again, I can't seem to find an article on server side awareness of client side selected rows.

Another minor issue is that I can style the selected row background using: 

div.RadGrid_Windows7 .RadGridSelectedItem  

color:black !important;  

background:none !important;  

background-color:#0080FF !important;  

}

But I cannot figure out how to style the row hover. From articles I have tried this:  

.GridRowOver_Windows7 

color:black !important;  

background:none !important;  

background-color:#0080FF !important;  

}

The client side to server side grab of selected rows datakeyvalues is more important to me however. Thanks in advance for any wisdom and know how you may provide!

Regards, Nimesh
Nimesh
Top achievements
Rank 1
 asked on 05 Jul 2012
2 answers
232 views
I'm not seeming to find anywhere where I can change the fore color of only the sorted header field. I'm using custom colors on the sort and I need to change the color of the text but only on the column that's sorted.
Web Services
Top achievements
Rank 2
 answered on 05 Jul 2012
4 answers
95 views
Hi!
I installed the ASP.NET AJAX kit on my server.
I copied the bin40 in the bin of my project.
I set my web.config like this :
<httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="Telerik_RadUploadProgressHandler_ashx" verb="*" precondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
    </httpHandlers>
    <httpModules>
<add name="RadUploadModule" precondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
    </httpModules>
I still have the same problem, that is to say :

RadUpload Ajax Callback error. Source url was not found

/Telerik.RadUploadProgressHandler.aspx?RadUrid=b157....

What can i do?
Plamen
Telerik team
 answered on 05 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?