Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
236 views
Please help

I have the following situation:

radgrid with custom template and editmode set to editformtype="template" and editmode="editforms". Also, defined

 

OnUpdateCommand="RadGrid2_UpdateCommand

for the first version and

OnItemCommand="RadGrid1_ItemCommand"

for the second version.

First I put radgrid item in editmode with first button:

RadGrid2.EditIndexes.Add(0);
RadGrid2.Rebind();


On the second button I am trying to bubble grid update from button control that is outside the radgrid like this:
if (commandButton.CommandName.ToLower() == "update")
            {
                foreach (GridEditFormItem item in RadGrid2.MasterTableView.GetItems(GridItemType.EditFormItem))
                {
                   RadGrid2.MasterTableView.PerformUpdate(item, true); // first version
                   item.FireCommandEvent("Update", string.Empty); //second version
                }

The corresponding event handlers bubble but I can`t get values from custom template radtextboxes:

 

<EditFormSettings EditFormType="Template" >
                            <EditColumn UniqueName="EditColumn"></EditColumn>
 <FormTemplate>
                                    <div>
                                        <tr>
                                            <td>
                                                Inicijali
                                            </td>
                                            <td>
                                                <telerik:RadTextBox ID="Inicijali" runat="server" Font-Names="Verdana" Font-Size="Small"
                                                    Text='<%# Bind("Inicijali") %>'>
                                                </telerik:RadTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Kratica imena
                                            </td>
                                            <td>
                                                <telerik:RadTextBox ID="KraticaImena" runat="server" Font-Names="Verdana" Font-Size="Small"
                                                    Text='<%# Bind("KraticaImena") %>'>
                                                </telerik:RadTextBox>
                                            </td>
                                        </tr>.....</table>

RadGrid definition:

<telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="DetailsViewSQLDataSource"
                        AutoGenerateColumns="false" OnUpdateCommand="RadGrid2_UpdateCommand" OnItemCommand="RadGrid1_ItemCommand"
                        AllowAutomaticUpdates="true">
                        <MasterTableView DataSourceID="DetailsViewSQLDataSource" AutoGenerateColumns="true"
                            DataKeyNames="IdOsobe" ShowHeader="false" EditMode="EditForms" AllowAutomaticInserts="true">

I tried like this:

protected void RadGrid2_UpdateCommand(object sender, GridCommandEventArgs e)
       {
           if (e.CommandName == RadGrid.UpdateCommandName)
           {
               if (e.Item is GridEditFormItem)
               {
                   GridEditFormItem item = (GridEditFormItem)e.Item;
                   int id = Convert.ToInt32(item.GetDataKeyValue("IdOsobe"));
                   if (id != 0)
                   {
                       RadTextBox txtInicijali =
                          (RadTextBox)item.FindControl("Inicijali");
 
                       RadGrid1.Rebind();
                   }
               }
           }
 
       }

But the value of txtInicijali.text is always string.empty.

How can get values from custom template?

Is there a better way to accomplish update from button outside the radgrid?

Another problem that I have:

I have defined <ItemTemplate></ItemTemplate> and <FormTemplate> and grid is in edit mode it shows both templates - does not hide itemtemplate! I want to item template and editformtemplate be the same.


Please help!
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2012
1 answer
53 views
Hi,

How give a parent node an other icon than a plus or minus when it is having no children?
No my treeview is given no icon for items which having no children.

Regards,
Wouter Splinter
Princy
Top achievements
Rank 2
 answered on 09 Jan 2012
1 answer
185 views
HI there,

Screenshot is attached , RadGrid is now showing Add New Record and refresh buttons, and text is also not displaying correctly.
2011-Q3-Nov 
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2012
1 answer
89 views
I have a RadGrid on my page with the Vista theme and there are absolutely no fonts specified anywhere.  So it's just picking up the default fonts (from the theme, I assume).  The fonts seem to be Arial or a variation of it.

When I export the grid to PDF, the fonts on the generated file are Times New Roman.

What do I have to do to have the PDF match the grid?
I am using RadControls for ASP.NET AJAX Q1 2011.
Princy
Top achievements
Rank 2
 answered on 09 Jan 2012
0 answers
148 views
I've read many of the threads on the forum concerning this issue, but they are very confusing and seem to focus on .net 4.

I am trying to use Ajax control toolkit 3.5 (version: 3.5.51116.0) with Telerik version 2010.1.519.35.  I have a masterpage with a RadScriptManager and I'm getting this error:

Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "AjaxControlToolkit.Properties.Resources.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.



Are these two versions not compatible?
Troy
Top achievements
Rank 1
 asked on 08 Jan 2012
2 answers
254 views
Hi,

I am using the latest version of Telerik Controls for Asp .net.
I'd like to know how to get the title of RadWindow aligned left.
Currently the title is shown at the center of the title bar.
Here is my code.

<telerik:RadWindowManager ID="SupIntdRadWindowManager" runat="server" EnableShadow="true" DestroyOnClose="true" Behaviors="Close,Move,Resize,Pin"
        AutoSize="true" VisibleStatusbar="false" Overlay="true" ShowContentDuringLoad="false" ReloadOnShow="true"  
        Modal="true" />

 var radWin = window.radopen("Something/foo.aspx");
                    radWin.SetTitle("Foo");
                    return false;


Thanks in advanced.

Regards,
Nyi Nyi
Sam Vanhoutte
Top achievements
Rank 1
 answered on 08 Jan 2012
0 answers
66 views
I have a requirement like this:
Having Edit template as a separe user control.
From Rad grid I am specifying "Edit Form" as this Edit template USer control.
But In runtime I need to launch Edit template user control with in different "mode.". 


My Example something like this..
<RadGrid>
--
--
<MasterTableView>
<GridEditColumn>
<GridEditFormSettings>
 <uc:EditTemplate Mode="UnRead" ... ; >
<ucEditTemplate Mode="Read"

Mode here is a public property of User control..which i will use to handle different panels..

SO,In a nutshell,How to change Edit template's property before that page launches?
Please help..! Tried item_bound,Item_created events..But not getting.. :(
Krish
Top achievements
Rank 1
 asked on 08 Jan 2012
2 answers
129 views
Hi Im using amazing telerik rad grid

i just have a issue and i dont know how can i change the number of items in the combo box under the grid
the default values are set to 10 20 and 50 and i wanna change them to 100 200 and 500 How can i do this?

thank you for you support
Pouya
Top achievements
Rank 1
 answered on 08 Jan 2012
9 answers
183 views
if i will need to use 2 different handle for range slider?
for right and left?
is it possible?
omer
Top achievements
Rank 1
 answered on 08 Jan 2012
0 answers
51 views
I'm struck in strange problem. In one of my forms I use RadAjaxManager, RadAjaxLoadingPanel, RadTabStrip, RadMultiPage and RadGrid along with some other controls. The page works correctly. My problem is that, when I scroll down the page, it will go up automatically. When I scroll up, it will go down. What would be the problem here?

One more problem is there, the loading panel is not working all the times. Its showing the loading image only some times.
Mukesh
Top achievements
Rank 1
 asked on 07 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?