Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
270 views
hi everybody i have some problem for get the value of some radnumerictexbox in my footer template of my radgrid, i have to  save this value in my database when the user push a button
this is my aspx code:



<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
                Width="1300px" GridLines="None" Skin="Sunset">
                <MasterTableView ShowFooter="true">
                    <Columns>
                        <telerik:GridBoundColumn DataField="COD_MATPRIMA" HeaderText="CODIGO">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="NOMMATPRI" HeaderText="NOMBRE">
                        </telerik:GridBoundColumn>
 
                        <telerik:GridTemplateColumn UniqueName="Quantity" HeaderText="UNIDADES">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Type="Number" DataType="System.Decimal" Value="0" ID="unidadesTextBox" runat="server"  Width="75">
                                    <NumberFormat   />
                                    <ClientEvents  OnBlur="recalculate" />
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Price" HeaderText="VALOR UNITARIO">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Type="Number" DataType="System.Decimal" ID="ValorUnitarioTextBox" Value="0" runat="server" Width="75">
                                    <NumberFormat  DecimalDigits="2" />
                                    <ClientEvents OnBlur="recalculate" />
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                Total:
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Result" HeaderText="VALOR TOTAL">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Value="0" DataType="System.Double" ID="ResultTextBox" runat="server"  ReadOnly="true">
                                    <NumberFormat  
                                        PositivePattern="$ n" NegativePattern="- $ n"/>
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Jan 2012
1 answer
66 views
I'm new to these radcontrols. I add subitems to panelbar items from my database and every item is expanded. I can't find a method to unexpand all items. Please help me. Thanks
Kugi
Top achievements
Rank 1
 answered on 22 Jan 2012
2 answers
310 views
Hi
I'm using radgrid in my applicaiton very commonly,almost in every page.
I have a requerement where I need to merge two columns headers and give the filter for second column.
curretly i'm doing as follows
<Columns>
     <telerik:GridTemplateColumn DataField="A" AllowFiltering="false">
     <ItemTemplate>
     <asp:Image id="image1"  runat="server" ImageUrl='<%# Bind("abc")%>' ToolTip='<%# Bind("def")%>' Height="15px"  />
     </ItemTemplate>
      </telerik:GridTemplateColumn>
     <telerik:GridHyperLinkColumn FilterControlToolTip="Filter Text"  DataTextField="Name" DataNavigateUrlFields="Name" UniqueName="HyperLinkColumn" DataNavigateUrlFormatString="some text" AllowFiltering="true" HeaderStyle-HorizontalAlign="Left"  FilterControlWidth="90px" Target="frame2" />
      </Columns>
Here I want to merge both grid template column and gridhyperlink column.
I want filter for hyperlink column with left alignment means,it will occupy enterire header.
please help me asap..
Ram
Top achievements
Rank 1
 answered on 22 Jan 2012
4 answers
141 views
Hi,
I have multiple controls (2 grids, 1 treview) with all of them opening separate radwindows via javascript to enter information. The radwindow saves the information and when it closes runs a callback javascript function that uses an ajaxrequest to reload the controls. Now all three use the ajaxrequest and according to the argument passed, the appropriate control is updated. On the page though, all three controls are added to the radajaxmanager list under the ajaxsetting for the ajaxmanager. So all three get updated when only 1 does.

Is there a way to separate this out so that only the control affected will be updated?

Roger
Top achievements
Rank 1
 answered on 22 Jan 2012
19 answers
991 views
i am having radgrid with some fields as  grid bound column and some fields numerictextboxes. I want to multiply one boundfield column(total Quantity) and 2 numerictextboox fields(NoOfDays,Price/Unit)and get the result on another numerictextbox(TotalPrice)  the numeric textboxes are editable and boundfield loaded as per query....and the sum of total price(TotalPrice) to be calculated as footer.......I tried as per the demo and i got the footer values .but i dont know how to multiply the boundfield value using script. which is the event fired on boundfield using script??
Robert
Top achievements
Rank 2
 answered on 22 Jan 2012
2 answers
58 views
hi 
i have a RadGrid control with template edit form implementation, i need to have a subset of controls in edit mode template different from the subset of controls in the add mode template, I've found a way to do that scenario but i'm not sure cause i'm new to Telerik Rad Controls and i did that by setting the controls in panels, at the code behind I've checked the type of the form and depending on the condition these controls turned on or off by setting the visibility property using this snippet:

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
           if (e.Item is GridEditFormInsertItem && RadGridConferences.MasterTableView.IsItemInserted)
           {
               Panel UploadConferenceImage = e.Item.FindControl("UploadConferenceImage") as Panel;
               Panel UploadConferenceNewsletter = e.Item.FindControl("UploadConferenceNewsletter") as Panel;
               Panel ConferenceImagePanel = e.Item.FindControl("ConferenceImagePanel") as Panel;
               RadEditor RadEditorConferenceTxtBody = e.Item.FindControl("RadEditorConferenceTxtBody") as RadEditor;
               if (UploadConferenceImage != null && UploadConferenceNewsletter != null && ConferenceImagePanel != null)
               {
                   UploadConferenceImage.Visible = true;
                   UploadConferenceNewsletter.Visible = true;
                   ConferenceImagePanel.Visible = false;
               }
               else
                   return;
               if (RadEditorConferenceTxtBody != null)
               {
                   RadEditorConferenceTxtBody.Style.Add("margin-top", "55px");
               }
               else
                   return;
           }
       }
  
another option i found is creating my own custom editor, please i need an advice, any help !! 
Rasheed
Top achievements
Rank 1
 answered on 22 Jan 2012
5 answers
722 views
Hi,

I have a radgrid.
<telerik:RadGrid ID="RGStyleGuideRestrictions" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" EnableEmbeddedSkins="False" Skin="Vista">
     <MasterTableView  EditMode="InPlace" DataSourceID="SqlDataSource1"  DataKeyNames="StartDate">
            <Columns>
              <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" UniqueName="StartDate"
               </telerik:GridBoundColumn>
               <telerik:GridTemplateColumn  UniqueName="TemplateColumn" HeaderText="Condition">
                <ItemTemplate>
                    <asp:Label ID= "lblCondition" runat = "server" ></asp:Label>
                </ItemTemplate>
               </telerik:GridTemplateColumn>
             </Columns>
      </MasterTableView>
</telerik:RadGrid>

Inside that few 'GridBoundColumn' are there and also 'GridTemplateCoulmn' are there.
When in server side, I want to access the values inside a 'GridBoundColumn', I can use 'datafield' property to get that. Like this:-
foreach (GridDataItem allitem in RadGrid1.MasterTableView.Items)
{
   if ((allitem["StartDate"].Text.ToString();
}

Now, my question is how to access values inside a 'GridTemplateColumn', as mentioned in aspx file above.
I want to access each value of that column, so that I could do some checking on each value and then move ahead.

Please tell what to do.
I would appreciate it.

thanks a ton:)

Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Jan 2012
6 answers
297 views
I would like to be able to access any menu item at runtime and based on certain logic be able to enable or disable or make it hide. What's the best way to identify each menu item at runtime? How do we give it an ID or some way to identify each one?

Reading form another post from three years ago, it was suggested to use Sitemap Datasource. Is there a better available now?
If we have to use the Sitemap Datasource (using XMLProvider the default), how can we use the icons that we have now at design time?

Thank you in advance!
Ben Hayat
Top achievements
Rank 2
 answered on 21 Jan 2012
6 answers
132 views
Here is a wierd problem.  I am not sure whether it is specific to my client machine or not...

In IE8, open a web page with RadEditor (Q3 2009, SP2) on it and then open the Image Manager in Rad Editor.  Cancel out of the image manager.  Now immediately close the browser window.

In my system, it throws an exception in IE.  Not a huge issue, because I was closing IE anyways, but disconcerting to my users to see it.

This does not happen in Firefox.

Can anyone else replicate this behavior?  Any ideas?

--Tad
Rahat
Top achievements
Rank 1
 answered on 21 Jan 2012
3 answers
120 views
Hi All,
wondering if somebody tried to implement control similar to this one described here: http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/treeviewcombobox/defaultcs.aspx
but with child nodes loaded after parent node is expanded (using postback/callback)? Basically it might be useful in case large size of data is present and loading all nodes into treeview is too space/time costly. The control then should make a call to server on each node expand, get child nodes and refresh staying opened all the time. Not sure if this is possible?
Bozhidar
Telerik team
 answered on 21 Jan 2012
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?