Posts

Donate

Bootstrap Table Get Or Retrieve All Table Data On CheckAll Event

Good evening fellow developers! Here's are solutions on how to obtain the Bootstrap-Table by Wenzhixin data if the check all event is fired. The first one loops through the table rows and then looks for the element in the row that holds the data either in the element attribute or innerText and retrieves it using jQuery methods. $( '#AttachmentsTable' ).on( 'check-all.bs.table' , function (e, rows) { var allrows = $( "#AttachmentsTable tr" ); downloadAttachmentsArray.length = 0 ; downloadAttachmentsArray = []; $.each(allrows, function (i, item) { if (i > 0 ) { var aElem = $(item).find( 'a' ).attr( 'file' ); downloadAttachmentsArray.push({ Filename : aElem }); } }); }); The better solution uses the built-in getData method of the bootstrap table which returns an array. And then you may then loop through that array to get the data. $( '#AttachmentsTable' ).o

Read Files From Google Photos Using Google Photos API, REST And VB.NET

Image
This is the VB.NET version of the post Read Files From Google Photos Using Google Photos API, REST and C#.NET . In your VB.NET project, you need to reference the Google.Apis.Auth package via NuGet and attach the JSON file that contains the Google API credentials. The models used for converting a JSON response to .NET object are shown below. Public Class clsResponseRootObject Public Property mediaItems As List( Of MediaItem) Public Property nextPageToken As String End Class Public Class MediaItem Public Property id As String Public Property productUrl As String Public Property baseUrl As String Public Property mimeType As String Public Property mediaMetadata As MediaMetadata Public Property filename As String End Class Public Class MediaMetadata Public Property creationTime As DateTime Public Property width As String Public Property height As String Public Property photo As Phot

Read Files From Google Photos Using Google Photos API, REST And C#.NET

Image
Related Tutorials On Google Photos API Read Files From Google Photos Using Google Photos API, REST and VB.NET Upload Photos, Images Or Files To Google Photos Using Google Photos API, Rest and C#.NET I've been working on a project last year to read and download images from Google Photos using the recent Google Photos API and C# as the programming language. During research, there was an existing .NET API called Picasa Web Albums API but has been deprecated and the docs suggested to migrate applications to the recent one. The examples in the current documentation provided are PHP, Java and REST API in which the example is written in Node.js. Since the requirement is to write a scheduled task or windows service in C#.NET, I decided to refresh my skills on sending requests to REST services using WebClient or HTTPWebRequest classes. To access media items, read or even download files using Google Photos API, you need to enable the Google Photos Library API, create a Google Proj

Uncheck Parent Node Only If All Children Are Unchecked In jsTree.js

Hello all, I was confronted with a minor issue in jsTree.js on how to uncheck a parent only if all it's child notes are unchecked. I checked on the documentation if there's an existing property or attribute that will be set to achieve this functionality. Since there is none, I decided to just do the coding stuff to solve this problem. The logic behind this is that get the parent node and it's direct descendants. If there are child nodes, loop through those elements and if one of them is still checked, the parent node remains checked. But to make this work, the properties cascade up and three_state should be set as 'up' and 'false'. $( '#jsEmployees' ).jstree({ 'checkbox' : { keep_selected_style: false , three_state: false , cascade: 'up' }, 'core' : { 'themes' : { 'icons' : false } }, 'plugins' : [ "defaults" , "checkbox" ], 'expand_selected_onload'

Div Inside A Parent Div That Has A Class col-md-2 Is Overlapping In Internet Explorer 11

Hello, I have a div inside a parent div that overlaps when rendered in Internet Explorer 11 browser. The parent div has a col-md-2 class. Other browsers such as Edge, Firefox and Chrome doesn't show this irregularity. After doing some spikes and testing, the solution for this is to set the child div's class to "row". <div class= "row" id= "chartReport" ></div> And in your css, remove the width and margin styles of the child div. #chartReport { border : 2px solid lightgray; background-color : white; /*width: 300px;*/ /*margin: 15px;*/ } Cheers!

Chart.js Small And Not Readable If Rendered Inside col-md-2 div.

Given the task at hand which is to show a chart report to customers inside the left menu div that has col-md-2 class, the chart isn't readable and small as reported by the users. The fix that I came up with was to the the height and width explicitly of the canvass element and adjust it's values to make the chart readable. <canvas id= "DeliveriesByDayCanvas" width= "600" height= "550" ></canvas>

Bootstrap Table Apply Word Break To <th> Cell Text

To apply word-break to a Bootstrap-Table <th> cell text by Wenzhixin, create a css style that set's the inner div of <th> white-space to normal !important and word-wrap to break-word. .tdOverviewTotalIllustrations div .th-inner { white-space : normal !important ; word-wrap: break-word; } Then in Bootstrap-Table's <th> element, set the data-class attribute to the defined style above. <th data-field= "totalIllustrations" data-sortable= "true" data-searchable= "true" data-class= "tdOverviewTotalIllustrations" >Total Illustrations</th>

How To Fix Or Freeze The Column Headers Of A Bootstrap Table

Image
Good evening! We've been requested by the client if we can freeze the column headers of the Bootstrap Table By Wenzhixin given the records loaded to the bootstrap-table is more than a hundred. I've tried using jQuery and CSS approaches and none of them work. Either they destroy the table layout or make a mess of the data. After scanning to the docs, the suggestion was to set the height of the table as mentioned by the author. So to mimic freeze table headers, you need to set the data-height of the bootstrap-table explicitly. Code: data-height="700" Output

Typography.Fraction and Typography.Capitals Not Working In WPF

I've been reading a post on working with Typography.Fraction and Typography.Capitals Enum on TextBlock controls and cannot get it to work as expected. After reading the Microsoft Docs, the solution was to set the FontFamily of the control to Palatino Linotype. <TextBlock Grid.Row= "0" FontSize= "32" FontFamily= "Palatino Linotype" Typography.DiscretionaryLigatures= "True" Typography.ContextualLigatures= "True" Typography.StandardLigatures= "True" > Quite effective find </TextBlock> <TextBlock Grid.Row= "1" FontSize= "32" FontFamily= "Palatino Linotype" Typography.Capitals= "AllSmallCaps" > Hello, World </TextBlock> <TextBlock Grid.Row= "2" FontSize= "32"

Collapse Or Expand A jsTree Node Programmatically

Good day all! Here's a snippet to collapse or exand a jstree node programmatically on page load based on the node id. The code below will collapse if node id is '45' while other nodes remain open. $( '#TreeRoles' ).bind( 'ready.jstree' , function (e, data) { var $tree = $( this ); $($tree.jstree().get_json($tree, { flat: true })).each( function (index, value) { var node = $tree.jstree().get_node( this .id); if (node.id === "45" ) { $tree.jstree().close_node({ "id" : node.id }); } else { $tree.jstree().open_node({ "id" : node.id }); } }); });

Donate