Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
306 views
I am trying to get a gridview to display a clickable icon that shows the current status of the gridview item which can be sorted and filtered. When clicked the status image should toggle between active / Inactive / Unknown images and update the appropriate item's status in the DB(immediately or after a save changes button is pressed, either way). The DB stores the status as an int where 0 = inactive, 1 = active, and any other number is unknown.  The radGrid uses an objectDataSource to access the DB which contains the int as 'Status'.

I tried to use an itemTemplate With a radButton with a buttonType of ToggleButton, a ToggleType of CustomToggle And three toggleStates (one for each status),  while the toggling between the images worked, I can't seem to bind original(default) toggleState to the 'Status' value, and being able to sort/filter based on that. 

.aspx:
01.<telerik:RadGrid ID="InvQryList" runat="server" AllowFilteringByColumn="True"
02.            AllowSorting="True" AutoGenerateDeleteColumn="True" DataSourceID="InvQryDS"
03.            Skin="Windows7">
04.            <ClientSettings EnableRowHoverStyle="True">
05.            </ClientSettings>
06.            <MasterTableView AutoGenerateColumns="False" DataSourceID="InvQryDS" FilterExpression="(it.Active != 0)">
07.              <Columns>
08.                ... Other Columns ...
09.                <telerik:GridTemplateColumn HeaderText="Active Toggle" DataField="Active">
10.                 <ItemTemplate>
11.                  <telerik:RadButton ID="ActiveToggle" runat="server" ButtonType="ToggleButton" ToggleType="CustomToggle" AutoPostBack="false"
12.                   Width="16px" Height="16px">
13.                  <ToggleStates>
14.                    <telerik:RadButtonToggleState Value="1" ImageUrl="img/spheres/green-16x16x32.png" />
15.                    <telerik:RadButtonToggleState Value="0" ImageUrl="img/spheres/red-16x16x32.png" />
16.                    <telerik:RadButtonToggleState Value="-1" ImageUrl="img/spheres/grey-16x16x32.png" />
17.                  </ToggleStates>
18.                  </telerik:RadButton>
19.                 </ItemTemplate>
20.                </telerik:GridTemplateColumn>
21.              </Columns>
22.            </MasterTableView>
23.          </telerik:RadGrid>

Any Help would be Great
 

 

 
Konstantin Dikov
Telerik team
 answered on 26 Mar 2014
0 answers
127 views
Hello

Using SqlDataSource Control Parameter for filtering my Database dynamically.
I wonder can i use Stored Procedure for controlling Database dynamically like SqlDataSource?

Thanks in advance

omer
Top achievements
Rank 1
 asked on 26 Mar 2014
7 answers
287 views
RadAsyncUpload in Grid

I noticed this on the Upload example:

"You need to ensure that any submit buttons on the page are disabled while upload is in progress. Otherwise, there is no guarantee that the files will be uploaded successfully"

How would I do that?

Marty
moegal
Top achievements
Rank 1
 answered on 26 Mar 2014
4 answers
142 views
Hey,

When using the RadEditor to markup some html5 microdata, it seems to strip out the 'itemscope' property.

So when in HTML pane pasting something like:
<span itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
    <meta itemprop="latitude" content="1.23456" />
    <meta itemprop="longitude" content="1.23456" />
</span>

it saves it like this:

<span itemprop="geo" itemtype="http://schema.org/GeoCoordinates">
    <meta itemprop="latitude" content="1.23456" />
    <meta itemprop="longitude" content="1.23456" />
</span>

This happens both on <span> and <div> and not just on geo microdata but all items containing 'itemscope'.

In this case I'm using the RadEditor inside Sitefinity v5.1, but after confirming Sitefinity doesn't strip/filter anything and its a RadEditor issue, I'm posting the question here...

Has anyone run into this and found a workaround ?

Jochem
Petar
Top achievements
Rank 1
 answered on 26 Mar 2014
1 answer
99 views
In development when I add the Filemanager to a screen and try to open the file explorer I get the error

HTTP Error 403.14 - ForbiddenThe Web server is configured to not list the contents of this directory.

I and just trying to access a subfolder in the web directory on my machine in VS2013
Frank
Top achievements
Rank 1
 answered on 26 Mar 2014
5 answers
339 views
I am not able to bind this checkbox to a nullable bit in sql:
<EditFormSettings EditFormType="Template">
  <FormTemplate>
  <telerik:RadButton ID="btnToggle"  runat="server" ToggleType="CheckBox" ButtonType="LinkButton" Checked='<%# Bind("inBudgetPCS") %>' >
  <ToggleStates>
   <telerik:RadButtonToggleState Text="In Budget" PrimaryIconCssClass="rbToggleCheckboxChecked" />
   <telerik:RadButtonToggleState Text="Not in Budget" PrimaryIconCssClass="rbToggleCheckbox" />
 </ToggleStates>
</telerik:RadButton>
  </FormTemplate>
</EditFormSettings>
It keeps generating "Invalid cast exception"
Maria Ilieva
Telerik team
 answered on 26 Mar 2014
4 answers
1.4K+ views
What's the best way to show Yes/No for boolean columns instead of true false? I don't want to change it in the SQL, because it would affect my ability to query and sort.

Thanks,
Andrew
Stef
Telerik team
 answered on 26 Mar 2014
4 answers
281 views
Is it possible to add template columns after Page_Init? 
I have dynamic columns in a radgrid that is nested inside another radgrid that can only be calculated after the parent radgrid is bound. 
This was working fine when I was binding the parent in Page_Init, but now I am binding it with the NeedDataSource event and the template columns no longer render, since Page_Init has already fired.

Is there anything I can do after Page_Init to render the columns added?
Eric
Top achievements
Rank 1
 answered on 26 Mar 2014
3 answers
130 views
Would media queries mess up the processes that go on between design / html / preview ?
Bozhidar
Telerik team
 answered on 26 Mar 2014
1 answer
197 views
in the drawing tools(pencil, draw circle, draw rectangle, and line) if you select one it shows the default color selected as white, however the default color is actually black and default fill for circle and rectangle is transparent... is there any setting i can put in to override the default color and make sure that the correct color displays when a user starts using those controls?
Slav
Telerik team
 answered on 26 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?