Overview
KtTable is a modern, feature-rich data table component for WinForms that provides beautiful rendering, custom cell types, and instant search functionality. Built on top of KtColor, KtBrush, and KtIcons for consistent theming and styling.
Basic Setup
Designer Properties
Column Configuration


Column Types
KtTable supports multiple column types:
Icon- SVG iconsAvatar- User avatars with iconsText- Standard text contentBadge- Status badges with colored backgroundsProgress- Progress bars with gradient support
Defining Columns
Creating Rows
Basic Row Creation
Populating Multiple Rows
Cell Types
1. Icon Cell
Display SVG icons with color support.
Parameters:
name- Icon identifier from Tabler icon setcolor- Tuple of two KtColor values for gradient or state colors
2. Avatar Cell
Display user avatars with icon backgrounds.
Parameters:
icon- Icon name to display in avatarforeground- Color of the iconbackground- Tuple of KtColor values for gradient background
3. Badge Cell
Display status badges with colored backgrounds.
Parameters:
value- Text to display in badgeforeground- Text color (use!operator to invert)background- Background color
4. Progress Cell
Display progress bars with gradient support.
Parameters:
value- Current progress valuecolor- KtBrushGradient for the progress barmax- Maximum value (default: 100)
5. Text Cell
Display standard text content.
Usage:
Simply assign string values directly to text columns
No special formatting required
Properties
Color Properties
Display Properties
Navigation Properties
Behavior Properties
Layout Properties
Rendering
Render Method
Call Render() after adding or modifying rows to update the display.
Best Practice:
Add all rows first, then call
Render()onceAvoid calling
Render()inside loops for better performance
Complete Example
Tips & Best Practices
Performance
Batch Operations: Add all rows before calling
Render()Search Latency: Adjust
Latencyproperty for search responsivenessColumn Width: Set explicit widths for performance with large datasets
Styling
Color Consistency: Use theme colors (PRIMARY, ACCENT, NEUTRAL) for consistency
Gradients: Use
KtBrushGradientfor modern, vibrant progress barsIcons: Use Tabler icon naming convention:
tabler.icon.name
Data Management
Primary Keys: Mark one column as
IsPrimaryKeyfor row identificationSearch: All columns have
Search = trueby default for instant filteringSorting: Configure
SortModeper column as needed
JSON Integration
KtTable includes built-in JSON parsing for API integration:
Advanced Features
Custom Colors
Dynamic Theming
Color Inversion
Summary
KtTable provides a complete modern table solution with:
โ Custom scrollbars - No ugly default scrollbars
โ Rich cell types - Icons, Avatars, Badges, Progress bars
โ Instant search - Real-time filtering with debounce
โ KtColor integration - Consistent theming and gradients
โ SVG icons - Crisp Tabler icons at any size
โ JSON support - Built-in parsing for API integration
โ High performance - Optimized rendering for large datasets
For more information about KtColor, KtBrush, and KtIcons, refer to their respective documentation.
Last updated
Was this helpful?

