Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
hello!

I have an ajax page with a grid and some nested grids.  I'm trying to load one of the nested grids on demand and run into a "control doesn't exist in this context" message.
<RadGrid 1>
     <MasterTableView>
          <NestedViewTemplate>
               <Label ID="lbl_Id" ... />
               <RadTabStrip>
                    <Tabs>
                        <RadTab Text="1" ... />
                        <RadTab Text="2" ... />
                    </Tabs>
                </RadTabStrip>
                <RadMultiPage ...>
                    <RadPageView ID="ForTab1" ... >
                        <RadGrid ID="NestedGrid1" OnNeedDataSource="NestedGrid1_OnNeedDataSource" ... />
                    </RadPageView>
                    <RadPageView ID="ForTab2" ... >
                        <RadGrid ID="NestedGrid2" ... />
                    </RadPageView>
                </RadMultiPage>
          </NestedViewTemplate>
     </MasterTableView>
 </RadGrid>

So my question is how do I get the label value to act as a parameter for the sqldataadapter calling a stored procedure onneeddatasource at the nested grid?

The backend contains the onneeddatasource function:
protected void NestedGrid1_OnNeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["AConnectionString"].ConnectionString);
    using (SqlCommand sqlComm = new SqlCommand("StoredProcedure1", con))
    {               
        sqlComm.CommandType = CommandType.StoredProcedure;
        sqlComm.Parameters.AddWithValue("@InTrId", lbl_Id.Text);
 
        SqlDataAdapter sda = new SqlDataAdapter(sqlComm);
        DataTable dt = new DataTable();
 
        sda.Fill(dt);
        rGrid_Dex_Wc_Scans.DataSource = sda;
    }           
}
Andrey
Telerik team
 answered on 26 Jul 2013
1 answer
104 views
Hi there,

I have a problem with the scheduler when running it in week mode.  When it is in week mode, selection of timeslots does not seem to work correctly.  Clicking on a slot does not highlight the slot, and trying to click and drag does not highlight the dragged section.  Subsequently, when trying to query the selected slots via the scheduler.get_selectedSlots() function, nothing is returned.

To replicate the issue, please do the following:

1) Go to http://clientdemos.spawtz.com
2) Click on "Administrator View" in the left hand menu
3) Click "View Calendar"
4) Select any slot in the scheduler and note that the slot is selected correctly.  Then right click and select "Create booking" and note that you get taken to the create booking page correctly.
5) Click close to get back to the calendar.
6) Change the drop down above the calendar from "Day View" to "Week View"
7) Try to click on any time slot and note that the selection does not happen.  And if you try and click and drag, the standard browser behaviour occurs (ie, it selects the actual HTML elements)

If I run it locally, and then use Chrome's developer tools to find where any exceptions are thrown, I find that when loading the page there is  a DOMException thrown in this file:

http://localhost/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_Content_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.915.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9799c67b-558a-475d-bf30-a0ccf0dbb8b7%3a16e4e7cd%3af7645509%3a7c926187%3a8674cba1%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1%3a2e42e72a%3aef347303%3a24ee1bba%3af46195d3%3a874f8ea2%3a4c8be21a%3a650fdad%3ad40f7d5c%3a431f16a4%3a97c1ce76%3ab68dcd79%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289


The details of the exception are "SyntaxError: DOM Exception 12" ,"Error: An invalid or illegal string was specified."  But of course, that file is minified, so I can't really delve any further into, nor do I know that is the issue or not, or if it is a red herring, as it seems to be thrown on the day view page as well.

Can you offer any advice on how I might be able to track this issue down?

Thanks for your help.

Kind regards,

Matthew
Plamen
Telerik team
 answered on 26 Jul 2013
1 answer
127 views
I have a RadGrid with a template column. Here is the column's markup:

<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumnMaterial column"                          HeaderText="Material" UniqueName="TemplateColumnMaterial">
<ItemTemplate>
     <asp:Label ID="LabelMaterialSubstring" runat="server" Text='<%#Eval("material").ToString().Substring(7, 3) %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>


Can I group by the value bound in the label's text property? If so, how?
Andrey
Telerik team
 answered on 26 Jul 2013
3 answers
86 views
I explain my issue, in a webform I can add entries to viewstate without problems through my userControl, sample:

Public Property ItemId As Integer?
    Get
        Return Me.ViewState("Id")
    End Get
    Set(value As Integer?)
        Me.ViewState.Add("Id", value) 
    End Set
End Property

But, if this entry is a dbcontext not attached entity, RadAjaxPanel seems to be affected. Sample code adding entity:

Public Property ItemId As Integer?
    Get
        Return Me.ViewState("Id")
    End Get
    Set(value As Integer?)
        Me.ViewState.Add("Id", value)
        Dim ctx = MyEntityContext
        ctx.Configuration.ProxyCreationEnabled = False
        Dim item = ctx.SomeCollection.find( value )
        Me.ViewState.Add("item", item)
    End Set
End Property

After adding 'item' to viewstate RadAjaxPanel don't respond, for example making visible or changing values to RadTextBox or other controls.

I have make a lot of tests, I can store into ViewState all kind of objects, for example, I have tested with new String() { "a", "b" } and all runs perfectly but storing detached entity.

Somebody know what this happens? Also, somebody has a workaround to store dbcontext simple entity through posts?

Regards

 
Maria Ilieva
Telerik team
 answered on 26 Jul 2013
3 answers
120 views
I am creating xml dynamically as the data source for a panelbar control.  Is there a way to set the color of the text in the panel bar items via the xml?

Thanks!

Sean Severson
Boyan Dimitrov
Telerik team
 answered on 26 Jul 2013
1 answer
293 views
I have GridNumericColumn:
<telerik:GridNumericColumn DataField="CostLimit" HeaderText="Limit" SortExpression="CostLimit" UniqueName="CostLimit" />
and Polish locale settings on my PC (comma as decimal separator)

When I type "1,2" in filter i get System.Data.EntitySqlException.
I can't type "1.2" in filter to test if it works.
When I use integer values like "1" filter works without errors.
Angel Petrov
Telerik team
 answered on 26 Jul 2013
1 answer
145 views
I'm using the application menu to display menu options to create certain items in my application. Based on the user's role I'm hiding certain menu options. Here's what it looks like:

New -> User (Get's hidden when role doesn't have authority)
        -> Role (Get's hidden when role doesn't have authority)
        -> Item 1
        -> Item 2

The problem is when using the OnClientApplicationMenuItemClicking event and the first two items are hidden server side and the user clicks the "Item 1" menu item all of the client side functions think "Item 1" is actually "User".

function OnRibbonApplicationMenuClicking(sender, eventArgs) {
    // Get the attributes for the button that was clicked
    var selectedButton = eventArgs.get_item();
}

"selectedButton" ends up being the "User" menu item instead of the "Item 1" menu item. 

Bozhidar
Telerik team
 answered on 26 Jul 2013
1 answer
126 views
Hi All,

I want to have a grid for order entry screen. first column is for item code. second column is for item description.

I only want the user to enter item code and item description will be populated automatically based on item master file table. I am using autocomplete text box in item column. the logic: once autocomplete selected a particular item code, item description in second column cell should display the desc without having to refresh.

Can Radgrid achieve this? 

any input is greatly appreciated!

Thanks!
Andrey
Telerik team
 answered on 26 Jul 2013
1 answer
123 views
Hi,

We are using RadGrid which contains GridBinaryImageColumn. When export this grid to excel, it is not including the data from this column.
Please let us know if it is possible to include the value from binary image column while exporting grid to excel. We have tried the Biff export option as well.
Kostadin
Telerik team
 answered on 26 Jul 2013
12 answers
909 views
  My program is showing doctor's appointments in timeline view.  Sometimes i want to hide weekend or any weekday if the doctor is not working on that day.

  I checked your timeline view and customization demos, the closest thing I can find is using the first day of week and last day of week, but it's not supported in timeline view.

  Is there a way I can hide a day in timeline view?  Or is there a way I can change the column width to 0, so it's like hide the column?

Jürgen
Top achievements
Rank 1
 answered on 26 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?