Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
263 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
115 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
940 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
45 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
677 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
235 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
74 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
92 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
4 answers
117 views
I'm currently using the Scheduler with a RadDock popup for the Appointments. I have small issue which I'm trying to solve for 2 days now and its driving me crazy :)

Whenever I set an appointment with a reminder, the reminder pops out correctly. When dismissing it I simply set the value of the Reminder to NULL in the DB. Now, everything works fine as long as I'm in the main Scheduler page.
At this point if I click any other appointment, even one that doesn't have a reminder, the previous reminder pops out a few seconds after the RadDock opens. I double checked the Database - the value of the reminder is set to NULL after dismissing it.    

The dismiss Event is shown below: 
Protected Sub scheduler_ReminderDismiss(sender As Object, e As Telerik.Web.UI.ReminderDismissEventArgs) Handles scheduler.ReminderDismiss
    Dim followup As New FollowUp(e.Appointment.ID)
    followup.Notification = DbNull.Value.ToString()
    DBTool.UpdateFollowUp(followup)
    scheduler.DataSource = DBTool.PopulateFollowUpAtMainPage()
    scheduler.Rebind()
End Sub

Another problem that I have is that the ReminderDismiss event doesn't refresh the scheduler. The scheduler is included in the AjaxManager. When debugging I do see the ReminderDismiss Event but it looks like the "Rebind" event of the scheduler is not refreshing the control. Maybe this is causing the issue?




 
Peter
Telerik team
 answered on 21 Jan 2012
7 answers
202 views
I have a grid which is in a user control. The grid is displayed in various sized containers in my application depending on the page its on. Ideally, I would like to make it so the grid's initial page size (the number of rows dipslayed on each grid page) is calculated from the avaialable height. In this way, I can avod the user ever having to scroll the grid results vertically. Of course, if they change the size of their window, scrolling may become necessary, but I'm not concerned about this scenario.

Is there a way to calculate the available height for the grid rows and set the grid pageSize property based on this height prior to binding? I don't believe its possible to set the pagesize through client-side code, so somehow the client-side height availability calculation would have to be transferred to some server-side code whcih actually adjusts the grid pageSize property on initial loading of the page.
Pavlina
Telerik team
 answered on 21 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?